sandeepmistry / arduino-nRF5

Arduino Core for Nordic Semiconductor nRF5 based boards
Other
905 stars 279 forks source link

Define a generic API for Timer2 #386

Closed pmalasp closed 3 years ago

pmalasp commented 5 years ago

Timer 2 is usally available for application, but is constrained by the use of the common ISR callback function TIMER2_IRQHandler which cannot be redefined across different libraries.

with this approach you can register up to 4 different callback functions for the 4 different CC registers, even if constrained by a single prescaler value.

Tested developing a simple app which uses modified Adafruit_Microbit and IRremote libraries.

sandeepmistry commented 3 years ago

Hi @pmalasp,

Thank you for this pull request. I would prefer that new functionality that is not part of the original Arduino API not be included in the project.

Instead I think it would be great if you could make a new Arduino for these new functionalities.