Host library for controlling a WiConnect enabled Wi-Fi module.
Dependents: wiconnect-ota_example wiconnect-web_setup_example wiconnect-test-console wiconnect-tcp_server_example ... more
types/WiconnectSerial.h
- Committer:
- dan_ackme
- Date:
- 2014-08-12
- Revision:
- 11:ea484e1b7fc4
- Parent:
- 4:c0966143aa22
- Child:
- 16:7f1d6d359787
File content as of revision 11:ea484e1b7fc4:
/* * Copyright 2014, ACKme Networks * All Rights Reserved. * * This is UNPUBLISHED PROPRIETARY SOURCE CODE of ACKme Networks; * the contents of this file may not be disclosed to third parties, copied * or duplicated in any form, in whole or in part, without the prior * written permission of ACKme Networks. */ #pragma once #include "WiconnectTypes.h" namespace wiconnect { /** * Serial class for interfacing to WiConnect WiFi module. * * @note Internal use only. */ class WiconnectSerial WICONNECT_SERIAL_BASE_CLASS { public: WiconnectSerial(const SerialConfig &config, Wiconnect *wiconnect = NULL); virtual ~WiconnectSerial(); void flush(void); int write(const void *data, int bytesToWrite, int timeoutMs); int read(void *data, int bytesToRead, int timeoutMs); protected: TimeoutTimer timeoutTimer; #ifdef WICONNECT_SERIAL_RX_BUFFER uint8_t ringBuffer[32]; bool bufferAlloc; void rxIrqHandler(void); #endif }; }