STM32F1: Servo "soft" PWM via timer interrupt (#14187)

This commit is contained in:
Tanguy Pruvot
2019-06-07 14:11:48 +02:00
committed by Scott Lahteine
parent 66e22d9f5a
commit 764f0d9c1c
3 changed files with 124 additions and 7 deletions

View File

@@ -49,7 +49,7 @@
#define SET_PWM_OD(IO) pinMode(IO, PWM_OPEN_DRAIN)
#define IS_INPUT(IO) (_GET_MODE(IO) == GPIO_INPUT_FLOATING || _GET_MODE(IO) == GPIO_INPUT_ANALOG || _GET_MODE(IO) == GPIO_INPUT_PU || _GET_MODE(IO) == GPIO_INPUT_PD)
#define IS_OUTPUT(IO) (_GET_MODE(IO) == GPIO_OUTPUT_PP)
#define IS_OUTPUT(IO) (_GET_MODE(IO) == GPIO_OUTPUT_PP || _GET_MODE(IO) == GPIO_OUTPUT_OD)
#define PWM_PIN(IO) (PIN_MAP[IO].timer_device != nullptr)