Would it be an option to have func and pin in UtilTimerTaskBuffer instead of a union ?
Not really - it's just more memory usage, and it's taking code that works for all platforms and then adding loads of platform-specific definitions to it.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Ok, so it's not DAC you want, just PWM?
Not really - it's just more memory usage, and it's taking code that works for all platforms and then adding loads of platform-specific definitions to it.
Just do something like: