There's one thing though I came across just now, using the new API.
I found that the pointer to the PWMDriver object is not good (compiler error), and looked into the code again.
According to other macros, pwmp has to be put in bracktes to be used as pointer, then it workes like a charm. So here is the replacement:
Code: Select all
#define pwm_lld_is_channel_enabled(pwmp, channel) \
(((pwmp)->tim->CCR[channel] != 0) || \
(((pwmp)->tim->DIER & (2 << channel)) != 0))
Hope this helps.
Cheers
Stefan