posilani dat
Dependencies: FatFileSystemCpp mbed PowerControl USBHostLite
Diff: wifi.h
- Revision:
- 20:66ecb2f0e307
- Parent:
- 17:ca53e6d36163
- Child:
- 26:5674b8978551
--- a/wifi.h Tue Oct 18 20:00:50 2016 +0000 +++ b/wifi.h Tue Mar 07 13:30:34 2017 +0000 @@ -12,8 +12,11 @@ class Wifi { public: - Wifi (PinName tx, PinName rx, PinName rts, PinName cts, PinName reset); - + Wifi (PinName tx, PinName rx, PinName cts, PinName reset); + /* + * Serves as constructor (we're changing PLL frequency) + */ + void init(void); /* * Returns received command (without #), just the one char */ @@ -27,7 +30,7 @@ /* * Sends one char to wifly */ - char readByte(); + char readByte(void); /* * Format: (int) -1 (int) -1 (int) swimmer_id @@ -35,13 +38,16 @@ * (int) -1 (int) -1 up to 1023 zeros */ //int sendFile(const char *fname, int swimmer_id); - int sendFile(const char *fname, int swimmer_id); + int sendFile(const char *fname); + bool readable(void); + void sendAck(void); + void sendNack(void); private: Serial wifi_; int in_buf; void bufferSend(char *buffer, size_t size); - int bufferSendVerify(char buffer); + int bufferSendVerify(char buffer); }; #endif \ No newline at end of file