summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo C2017-04-18 19:56:54 +0200
committerLeo C2017-04-18 19:56:54 +0200
commit85fbd0c57a5f553cb22cfdec2daaf8c70afdbe96 (patch)
treea884b8ac7b834cb8f61668b5b94704d44ae32cca
parent4d08a2f77cb136eeac9a0ec3bc5caf9fbba94c52 (diff)
downloadirmp-85fbd0c57a5f553cb22cfdec2daaf8c70afdbe96.zip
Add Macro for timer (timer 3), change IRMP_PORT to PB4 (TIM3_CH1)
-rw-r--r--irmp.h1
-rw-r--r--irmpconfig.h9
-rw-r--r--irmpsystem.h1
3 files changed, 6 insertions, 5 deletions
diff --git a/irmp.h b/irmp.h
index 53e16c7..df05e57 100644
--- a/irmp.h
+++ b/irmp.h
@@ -73,6 +73,7 @@
# define IRMP_PIN IRMP_PORT // for use with input(x) below
# define input(x) ((GPIO_IDR(IRMP_PORT) & (1<<IRMP_BIT)) != 0)
//# define input(x) (BBIO_PERIPH(IRMP_PORT+IDR, IRMP_BIT))
+# define TIM_IRMP CONCAT(TIM, IRMP_TIMER)
#elif defined (STELLARIS_ARM_CORTEX_M4)
# define _CONCAT(a,b) a##b
diff --git a/irmpconfig.h b/irmpconfig.h
index 75d9834..6cc70f8 100644
--- a/irmpconfig.h
+++ b/irmpconfig.h
@@ -133,16 +133,17 @@
*---------------------------------------------------------------------------------------------------------------------------------------------------
*/
#elif defined (ARM_STM32) // use C13 as IR input on STM32
-# define IRMP_PORT_LETTER C
-# define IRMP_BIT_NUMBER 13
+# define IRMP_PORT_LETTER B
+# define IRMP_BIT_NUMBER 4
/*---------------------------------------------------------------------------------------------------------------------------------------------------
* Change hardware pin here for ARM STM32 with libopencm3
*---------------------------------------------------------------------------------------------------------------------------------------------------
*/
#elif defined (ARM_OPENCM3) // use C13 as IR input on STM32
-# define IRMP_PORT_LETTER C
-# define IRMP_BIT_NUMBER 13
+# define IRMP_PORT_LETTER B
+# define IRMP_BIT_NUMBER 4
+# define IRMP_TIMER 3 // Timer to use
/*---------------------------------------------------------------------------------------------------------------------------------------------------
* Change hardware pin here for Stellaris ARM Cortex M4
diff --git a/irmpsystem.h b/irmpsystem.h
index e1fbc97..7300a76 100644
--- a/irmpsystem.h
+++ b/irmpsystem.h
@@ -28,7 +28,6 @@
# define PIC_CCS
#elif defined(STM32F1) // ARM STM32 with libopencm3
# define ARM_OPENCM3
-# define F_CPU (SysCtlClockGet())
#elif defined(STM32L1XX_MD) || defined(STM32L1XX_MDP) || defined(STM32L1XX_HD) // ARM STM32
# include <stm32l1xx.h>
# define ARM_STM32