copy of example to toggle multiple IOs simultaneously

Committer:
tulanthoar
Date:
Fri Apr 21 19:56:01 2017 +0000
Revision:
0:04d55bfd084e
copy of example to toggle multiple IOs simultaneously

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tulanthoar 0:04d55bfd084e 1 #include "mbed.h"
tulanthoar 0:04d55bfd084e 2
tulanthoar 0:04d55bfd084e 3 #define IOS (0xA0) // PA_5 + PA_7
tulanthoar 0:04d55bfd084e 4
tulanthoar 0:04d55bfd084e 5 PortOut myIOs(PortA, IOS);
tulanthoar 0:04d55bfd084e 6
tulanthoar 0:04d55bfd084e 7 int main() {
tulanthoar 0:04d55bfd084e 8 while(1) {
tulanthoar 0:04d55bfd084e 9 myIOs = myIOs ^ IOS; // Toggle IOs level
tulanthoar 0:04d55bfd084e 10 wait(0.5); // 500 ms
tulanthoar 0:04d55bfd084e 11 }
tulanthoar 0:04d55bfd084e 12 }
tulanthoar 0:04d55bfd084e 13