summaryrefslogtreecommitdiff
path: root/irsnd.h
diff options
context:
space:
mode:
authorLeo C2017-04-30 12:43:56 +0200
committerLeo C2017-04-30 12:43:56 +0200
commit54cbcce61b31454cc76ad2a75d4d5e479d896345 (patch)
tree3fa240748ce2f8b0abfbda17da867c0a45f1a66b /irsnd.h
parenta8915151dc5ddd5342d4b8db48a563abf4369891 (diff)
downloadirmp-54cbcce61b31454cc76ad2a75d4d5e479d896345.zip
libopencm3 for IRSND
Diffstat (limited to 'irsnd.h')
-rw-r--r--irsnd.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/irsnd.h b/irsnd.h
index 748a4ea..b33dfd9 100644
--- a/irsnd.h
+++ b/irsnd.h
@@ -47,6 +47,18 @@
# warning The STM32 port of IRSND uses the ST standard peripheral drivers which are not enabled in your build configuration.
# endif
+#elif defined (LIBOPENCM3) // STM32 whith libopencm3
+# define _CONCAT(a,b) a##b
+# define CONCAT(a,b) _CONCAT(a,b)
+# define IRSND_PORT CONCAT(GPIO, IRSND_PORT_LETTER)
+# define IRSND_PORT_RCC CONCAT(RCC_GPIO, IRSND_PORT_LETTER)
+# define IRSND_BIT CONCAT(GPIO, IRSND_BIT_NUMBER)
+# define IRSND_TIMER CONCAT(TIM, IRSND_TIMER_NUMBER)
+# define IRSND_TIMER_CHANNEL CONCAT(TIM_OC, IRSND_TIMER_CHANNEL_NUMBER)
+# define IRSND_TIMER_ARR TIM_ARR(IRSND_TIMER)
+# define IRSND_TIMER_ARR TIM_ARR(IRSND_TIMER)
+# define IRSND_TIMER_RCC CONCAT(RCC_TIM, IRSND_TIMER_NUMBER)
+
#elif defined(PIC_C18)
# if defined(__12F1840)