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
Diff: types/WiconnectSerial.h
- Revision:
- 0:ea85c4bb5e1f
- Child:
- 1:6ec9998427ad
diff -r 000000000000 -r ea85c4bb5e1f types/WiconnectSerial.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/types/WiconnectSerial.h Mon Aug 11 09:58:24 2014 +0000 @@ -0,0 +1,42 @@ +/* + * 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 +{ + +class WiconnectSerial WICONNECT_SERIAL_BASE_CLASS +{ +public: + WiconnectSerial(const SerialConfig &config, Wiconnect *wiconnect = NULL); + //~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 +}; + + +} + + +