Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Toggle Class Reference
Toggle pin for debugging purposes. More...
#include <toggle.h>
Public Member Functions | |
| Toggle (PinName pin) | |
| toggle constructor | |
| void | toggle (int n) |
| Command to n times toggle the pin. | |
Detailed Description
Toggle pin for debugging purposes.
Example:
#include "mbed.h" #include "toggle.h" Toggle pin(P1_24); Toggle led(P1_25); main() { while(1) { pin.toggle(5); // toggle pin 5 times wait(1); led.toggle(3); // toggle led 3 times wait(0.5); } }
Definition at line 32 of file toggle.h.
Constructor & Destructor Documentation
| Toggle | ( | PinName | pin ) |
Member Function Documentation
| void toggle | ( | int | n ) |
Command to n times toggle the pin.
Definition at line 10 of file toggle.cpp.
Generated on Fri Aug 5 2022 21:23:55 by
1.7.2