Nathan Yonkee
/
Nucleo_toggle_ios
copy of example to toggle multiple IOs simultaneously
Diff: main.cpp
- Revision:
- 0:04d55bfd084e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Apr 21 19:56:01 2017 +0000 @@ -0,0 +1,13 @@ +#include "mbed.h" + +#define IOS (0xA0) // PA_5 + PA_7 + +PortOut myIOs(PortA, IOS); + +int main() { + while(1) { + myIOs = myIOs ^ IOS; // Toggle IOs level + wait(0.5); // 500 ms + } +} + \ No newline at end of file