BusInOut Hello World

Fork of BusInOut_HelloWorld by Mbed

Use

The BusInOut interface is used to create an artificial bus of pins and read from / write to them. Pay special attention to the ordering of the pins in the initialization.

API

API reference.

Import librarymbed

No documentation found.

main.cpp

Committer:
mbed_official
Date:
2013-02-12
Revision:
0:91a6f3d1b2f0
Child:
1:075e57eccf3a

File content as of revision 0:91a6f3d1b2f0:

#include "mbed.h"
 
BusInOut pins(p5, p10, p7);
 
int main() {
    pins.output();
    pins = 0x3;     
    wait(1);
    pins.input();
    wait(1);
    if(pins == 0x6) {
        printf("Hello!\n");
    }
}