BusIn HelloWorld

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 
00003 BusIn nibble(p5, p6, p18, p11);
00004 
00005 int main() {
00006     while(1) {
00007         switch(nibble) {
00008             case 0x3: printf("Hello!\n"); break; // p5 and p6 are 1
00009             case 0x8: printf("World!\n"); break; // p11 is 1
00010         }
00011     }
00012 }