nlgplay for mbed
Dependencies: SDFileSystemEx mbed
Diff: main.cpp
- Revision:
- 5:27f193e21222
- Parent:
- 4:4dc67a366727
- Child:
- 6:e48296dca6bb
--- a/main.cpp Fri May 30 08:42:57 2014 +0000 +++ b/main.cpp Mon Jun 02 01:57:54 2014 +0000 @@ -2,13 +2,13 @@ #include "SDFileSystem.h" #include "lcd.h" -DigitalOut io01(dp13); -DigitalOut io02(dp26); -DigitalOut io03(dp17); -DigitalOut io04(dp4); +DigitalOut io01(dp13, 0); +DigitalOut io02(dp26, 0); +DigitalOut io03(dp17, 0); +DigitalOut io04(dp4, 0); -DigitalIn sw_play(dp24,PullUp); -DigitalIn sw_next(dp10,PullUp); +DigitalIn sw_play(dp24, PullUp); +DigitalIn sw_next(dp10, PullUp); DigitalOut led1(LED1); DigitalOut led2(LED2); @@ -48,14 +48,6 @@ #define DBS io01 #define CTS io02 -void init_io(void) -{ - RCK = 0; - SCK = 0; - DBS = 0; - CTS = 0; -} - #define _WAIT for(int wcnt=0; wcnt < 2; wcnt++) // 16bit output @@ -749,11 +741,12 @@ led1 = 0; led2 = 0; - // needs wait 20ms or so for power on sequence.(to be enough voltage level) - wait_ms(20); + wait_ms(5); lcd_init(); - + + // wait for power up + wait_ms(100); boardInit(); int files = 0; @@ -786,7 +779,7 @@ printf("result_us=%dus\n", result_us); printf("DATE:%s\nTIME:%s\n", __DATE__, __TIME__); - lcd_printStr2("NBCTRL", "Ver 1.08"); + lcd_printStr2("NBCTRL", "Ver 1.09"); wait(3); sprintf(buf, "%8s", __DATE__); lcd_printStrYscr(1, buf);