The library can flash an LED or DigitalOut pin at 50% duty using a Ticker interrupt triggered toggle function. This library does NOT use wait() so that it can flash a pin while more code is being executed. Instead, it relies on Ticker generated interrupts. There is only one parameter required, the on/off time of the pin in seconds (i.e. 0.5 means 0.5 seconds on and 0.5 seconds off).

Download repository: zip gz

Files at revision 3:dbd7ab16f171

Name Size Actions
[up]
ToggleFlash.cpp 2742 Revisions Annotate
ToggleFlash.h 3833 Revisions Annotate