
AP mode
Dependencies: NetworkSocketAPI WizFi310Interface mbed
Fork of WizFi310_TCP_Echo_Server_Example by
Diff: main.cpp
- Revision:
- 6:f27c1fe6abfd
- Parent:
- 5:e313e52adcaf
- Child:
- 8:e26236864101
--- a/main.cpp Mon Oct 02 22:02:47 2017 +0000 +++ b/main.cpp Tue Oct 03 02:46:16 2017 +0000 @@ -27,7 +27,7 @@ #define TEST_MODE 0 #define DEMO_MODE 1 -#define MODE TEST_MODE +#define MODE DEMO_MODE WizFi310Interface wifiInterface(D1, D0, D7, D6, D8, NC, 115200); ShiftRegisterControlClass m_register(PC_10, PC_11, PC_12); @@ -86,9 +86,9 @@ #if MODE == DEMO_MODE //Decoder Init - VS1053 player(PA_08, PA_07, PA_06, PA_00, PA_05, PA_01, PA_02); // mosi, miso, sck, cs, bsync, dreq, rst - player.hardwareReset(); //Make a reset to the VS1053 board - player.modeSwitch(); //Patch the VS1054 board to play MP3 files (very important!). + VS1053 *player = new VS1053(PA_08, PA_07, PA_06, PA_00, PA_05, PA_01, PA_02); // mosi, miso, sck, cs, bsync, dreq, rst + player->hardwareReset(); //Make a reset to the VS1053 board + player->modeSwitch(); //Patch the VS1054 board to play MP3 files (very important!). #endif //Wifi Station(Client) Mode start @@ -98,7 +98,7 @@ #if MODE == DEMO_MODE //detecting start - detecting(player, socket, buf, id, m_register) + detecting(player, socket, buf, id, m_register); #endif #if MODE == TEST_MODE @@ -116,8 +116,8 @@ #if MODE == DEMO_MODE //free decoder - player.sendCancel(); - player.stop(); + player->sendCancel(); + player->stop(); #endif printf("D\n");