Peter Cooper
/
diags
test code for our MBED board
Diff: digital.c
- Revision:
- 1:6877bb99aa17
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/digital.c Wed May 04 08:30:52 2011 +0000 @@ -0,0 +1,44 @@ +#include "mbed.h" +#include "main.h" +#include "useful.h" + +BusOut myleds(p21,p22,p23,p24,p8,p25,p26); + +BusOut sio_io(p27,p5,p6,p7); + +void digital_test(char l) +{ + char a,b; + + a = 0; + b = 0; + while(b != l){ + while(a!=0x80){ + myleds = a; + a++; + wait(0.01); + } + b++; + } + +} + +void digital_sio_test(void) +{ + char a; + char b; + + lprintf("In SIO Test Code\n\r"); + + a=0; + while(a!=4){ + b = 0; + while(b!=16){ + sio_io = b; + myleds = b; + b++; + wait(0.1); + } + a++; + } +} \ No newline at end of file