BusInOut Hello World

Dependencies:   mbed

Fork of BusInOut_HelloWorld by mbed official

Committer:
mbed_official
Date:
Tue Feb 12 11:26:02 2013 +0000
Revision:
0:91a6f3d1b2f0
Child:
1:075e57eccf3a
BusInOut HelloWorld

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 0:91a6f3d1b2f0 1 #include "mbed.h"
mbed_official 0:91a6f3d1b2f0 2
mbed_official 0:91a6f3d1b2f0 3 BusInOut pins(p5, p10, p7);
mbed_official 0:91a6f3d1b2f0 4
mbed_official 0:91a6f3d1b2f0 5 int main() {
mbed_official 0:91a6f3d1b2f0 6 pins.output();
mbed_official 0:91a6f3d1b2f0 7 pins = 0x3;
mbed_official 0:91a6f3d1b2f0 8 wait(1);
mbed_official 0:91a6f3d1b2f0 9 pins.input();
mbed_official 0:91a6f3d1b2f0 10 wait(1);
mbed_official 0:91a6f3d1b2f0 11 if(pins == 0x6) {
mbed_official 0:91a6f3d1b2f0 12 printf("Hello!\n");
mbed_official 0:91a6f3d1b2f0 13 }
mbed_official 0:91a6f3d1b2f0 14 }