Toggle several IOs of a port at the same time.

Dependencies:   mbed

main.cpp

Committer:
arostm
Date:
22 months ago
Revision:
1:9b2cf74ea65b
Parent:
0:5409e32ac226

File content as of revision 1:9b2cf74ea65b:

#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
    }
}