firmware of NBCTRLV1 / AYC01
Dependencies: SDFileSystemEx mbed
Revision 1:29f0e76a9999, committed 2016-04-18
- Comitter:
- bkc_mbed
- Date:
- Mon Apr 18 00:36:37 2016 +0000
- Parent:
- 0:722cc5360dc3
- Commit message:
- v1.30
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 722cc5360dc3 -r 29f0e76a9999 main.cpp --- a/main.cpp Mon Feb 08 05:49:26 2016 +0000 +++ b/main.cpp Mon Apr 18 00:36:37 2016 +0000 @@ -5,6 +5,8 @@ // ./lpc21isp -bin file.bin /dev/cu.usbserial-??? 115200 12000 // // 20151008: updated. +// 20160418: imporved file/dir selector +// improved init sequence // #include <stdio.h> @@ -28,7 +30,7 @@ #define PRG_NAME "NLGPLAY" -#define PRG_VER_BASE "V1.22" +#define PRG_VER_BASE "V1.30" #ifndef USE_SPI #define PRG_VER PRG_VER_BASE @@ -1001,25 +1003,27 @@ void disp_filesel(int mode) { char buf[16]; - + char buf_mode[16]; + char *mode_name; switch(mode) { case MODE_GETLIST: - mode_name = "LIST SEL"; + mode_name = "LIST"; break; case MODE_GETDIR: - mode_name = "DIR SEL"; + mode_name = "DIR "; break; default: - mode_name = "FILE SEL"; + mode_name = "FILE"; } + sprintf(buf_mode, "%s %03d", mode_name, g.idx + 1); strncpy(buf, g.file, 8); buf[8] = 0; // 表示 - lcd.printStr2(buf, mode_name); + lcd.printStr2(buf, buf_mode); } // @@ -1398,17 +1402,24 @@ // I/O初期化 ioInit(); + // シフトレジスタの初期化 + SHIFTOUT(ACTLOW & ~(ICL), 0x00); + // 立ち上がり待ち wait_ms(20); - // シフトレジスタの初期化 - SHIFTOUT(0xFF, 0xFF); - // LCD初期化 lcd.init(); + // ICLなどをHにする + SHIFTOUT(ACTLOW, 0x00); + + // 消音する + boardMute(); + // タイトル表示 int key = putTitle(); + // NEXTボタンでメニュー表示 if (key & SW_NEXT)