posilani dat
Dependencies: FatFileSystemCpp mbed PowerControl USBHostLite
Diff: wifi.cpp
- Revision:
- 18:7acae34b518d
- Parent:
- 17:ca53e6d36163
- Child:
- 19:c2476c0ea3e0
--- a/wifi.cpp Tue Nov 10 13:39:39 2015 +0000 +++ b/wifi.cpp Tue Jan 12 21:35:39 2016 +0000 @@ -1,12 +1,13 @@ #include "wifi.h" #include "utils.h" -#define BAUDR 1100000 +//#define BAUDR 1100000 +#define BAUDR 460800 #define SEND_SIZE 1024 Wifi::Wifi (PinName tx, PinName rx, PinName rts, PinName cts, PinName reset): wifi_(tx, rx) { - wifi_.set_flow_control(SerialBase::RTSCTS, rts, cts); + //wifi_.set_flow_control(SerialBase::RTSCTS, rts, cts); wifi_.baud(BAUDR); } @@ -23,7 +24,7 @@ FILE *file = fopen(fname, "rb"); if (file == NULL) { - printf("\r\nUnable to open %s", fname); + printf("Unable to open %s\r\n", fname); return -1; } in_buf = 0; @@ -107,7 +108,6 @@ in_buf = 0; while (counter++ < 10) { bufferSend(buffer, SEND_SIZE); - while (!wifi_.readable()) ; if (wifi_.getc() == 'A')