From 54cbcce61b31454cc76ad2a75d4d5e479d896345 Mon Sep 17 00:00:00 2001 From: Leo C Date: Sun, 30 Apr 2017 12:43:56 +0200 Subject: libopencm3 for IRSND --- irsndconfig.h | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'irsndconfig.h') diff --git a/irsndconfig.h b/irsndconfig.h index 8ed36bf..4f58bda 100644 --- a/irsndconfig.h +++ b/irsndconfig.h @@ -152,19 +152,22 @@ # define IRSND_TIMER_CHANNEL_NUMBER 1 // only channel 1 can be used at the moment, others won't work /*--------------------------------------------------------------------------------------------------------------------------------------------------- - * Teensy 3.x with teensyduino gcc compiler + * ARM STM32 with libopencm3 section: *--------------------------------------------------------------------------------------------------------------------------------------------------- */ -#elif defined (TEENSY_ARM_CORTEX_M4) -# define IRSND_PIN 5 // choose an arduino pin with PWM function! +#elif defined (LIBOPENCM3) // use B6 as IR output on STM32 whith libopencm3 +# define IRSND_PORT_LETTER B +# define IRSND_BIT_NUMBER 9 +# define IRSND_TIMER_NUMBER 4 +# define IRSND_TIMER_CHANNEL_NUMBER 4 +# define F_CPU // KLUDGE: make irsnd.c happy (TODO:) /*--------------------------------------------------------------------------------------------------------------------------------------------------- - * Other target systems + * Teensy 3.x with teensyduino gcc compiler *--------------------------------------------------------------------------------------------------------------------------------------------------- */ -#elif !defined (UNIX_OR_WINDOWS) -# error target system not defined. -#endif +#elif defined (TEENSY_ARM_CORTEX_M4) +# define IRSND_PIN 5 // choose an arduino pin with PWM function! /*--------------------------------------------------------------------------------------------------------------------------------------------------- * ESP8266 (Arduino, see IRSEND.ino) @@ -173,6 +176,14 @@ #elif defined (__xtensa__) # define IRSND_PIN 0 // choose an arduino pin with PWM function! +/*--------------------------------------------------------------------------------------------------------------------------------------------------- + * Other target systems + *--------------------------------------------------------------------------------------------------------------------------------------------------- + */ +#elif !defined (UNIX_OR_WINDOWS) +# error target system not defined. +#endif + /*--------------------------------------------------------------------------------------------------------------------------------------------------- * Use Callbacks to indicate output signal or something else *--------------------------------------------------------------------------------------------------------------------------------------------------- -- cgit v1.2.3