Hi everyone,

I recently implemented a few new features for the nRF52 PWM driver and
will probably implement them for soft PWM as well.

The features:
* Interrupts fired every cycle with user handler and parameter data;
* A mode where the device plays for n cycles;
* Interrupts fired at the end of a sequence of n cycles with user
handler and parameter data.

These changes are PRed here:
https://github.com/apache/mynewt-core/pull/836

There is an example (pwm_test) which uses the also PRed easing library:
https://github.com/apache/mynewt-core/pull/822

These features change the pwm_chan_cfg datastructure on pwm.h, wich is
general to all drivers.
I can argue that these features are implementable on virtually any PWM
device since every hardware PWM implementation I've seen so far uses
timers and counters, however there might be (and probably are)
exceptions.
Anyway a driver which doesn't use these new fields on this
datastructure is still implementable(well, we have soft PWM using the
sabe API interface and it works).

The alternative to this would be to write a datastructure on the
driver's implementation header file (pwm_nrf52.h in this case) with
the new fields.

What do you think?

Best,

Miguel Azevedo

Reply via email to