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@11:ea484e1b7fc4, 2014-08-12 (annotated)
- Committer:
- dan_ackme
- Date:
- Tue Aug 12 02:34:46 2014 -0700
- Revision:
- 11:ea484e1b7fc4
- Parent:
- 4:c0966143aa22
- Child:
- 16:7f1d6d359787
updated documnetation
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dan_ackme | 0:ea85c4bb5e1f | 1 | /* |
dan_ackme | 0:ea85c4bb5e1f | 2 | * Copyright 2014, ACKme Networks |
dan_ackme | 0:ea85c4bb5e1f | 3 | * All Rights Reserved. |
dan_ackme | 0:ea85c4bb5e1f | 4 | * |
dan_ackme | 0:ea85c4bb5e1f | 5 | * This is UNPUBLISHED PROPRIETARY SOURCE CODE of ACKme Networks; |
dan_ackme | 0:ea85c4bb5e1f | 6 | * the contents of this file may not be disclosed to third parties, copied |
dan_ackme | 0:ea85c4bb5e1f | 7 | * or duplicated in any form, in whole or in part, without the prior |
dan_ackme | 0:ea85c4bb5e1f | 8 | * written permission of ACKme Networks. |
dan_ackme | 0:ea85c4bb5e1f | 9 | */ |
dan_ackme | 0:ea85c4bb5e1f | 10 | |
dan_ackme | 0:ea85c4bb5e1f | 11 | #pragma once |
dan_ackme | 0:ea85c4bb5e1f | 12 | |
dan_ackme | 0:ea85c4bb5e1f | 13 | #include "WiconnectTypes.h" |
dan_ackme | 0:ea85c4bb5e1f | 14 | |
dan_ackme | 0:ea85c4bb5e1f | 15 | |
dan_ackme | 0:ea85c4bb5e1f | 16 | namespace wiconnect |
dan_ackme | 0:ea85c4bb5e1f | 17 | { |
dan_ackme | 0:ea85c4bb5e1f | 18 | |
dan_ackme | 11:ea484e1b7fc4 | 19 | /** |
dan_ackme | 11:ea484e1b7fc4 | 20 | * Serial class for interfacing to WiConnect WiFi module. |
dan_ackme | 11:ea484e1b7fc4 | 21 | * |
dan_ackme | 11:ea484e1b7fc4 | 22 | * @note Internal use only. |
dan_ackme | 11:ea484e1b7fc4 | 23 | */ |
dan_ackme | 0:ea85c4bb5e1f | 24 | class WiconnectSerial WICONNECT_SERIAL_BASE_CLASS |
dan_ackme | 0:ea85c4bb5e1f | 25 | { |
dan_ackme | 0:ea85c4bb5e1f | 26 | public: |
dan_ackme | 0:ea85c4bb5e1f | 27 | WiconnectSerial(const SerialConfig &config, Wiconnect *wiconnect = NULL); |
dan_ackme | 4:c0966143aa22 | 28 | virtual ~WiconnectSerial(); |
dan_ackme | 0:ea85c4bb5e1f | 29 | |
dan_ackme | 0:ea85c4bb5e1f | 30 | void flush(void); |
dan_ackme | 0:ea85c4bb5e1f | 31 | int write(const void *data, int bytesToWrite, int timeoutMs); |
dan_ackme | 0:ea85c4bb5e1f | 32 | int read(void *data, int bytesToRead, int timeoutMs); |
dan_ackme | 0:ea85c4bb5e1f | 33 | |
dan_ackme | 0:ea85c4bb5e1f | 34 | protected: |
dan_ackme | 0:ea85c4bb5e1f | 35 | TimeoutTimer timeoutTimer; |
dan_ackme | 0:ea85c4bb5e1f | 36 | #ifdef WICONNECT_SERIAL_RX_BUFFER |
dan_ackme | 0:ea85c4bb5e1f | 37 | uint8_t ringBuffer[32]; |
dan_ackme | 0:ea85c4bb5e1f | 38 | bool bufferAlloc; |
dan_ackme | 0:ea85c4bb5e1f | 39 | void rxIrqHandler(void); |
dan_ackme | 0:ea85c4bb5e1f | 40 | #endif |
dan_ackme | 0:ea85c4bb5e1f | 41 | }; |
dan_ackme | 0:ea85c4bb5e1f | 42 | |
dan_ackme | 0:ea85c4bb5e1f | 43 | |
dan_ackme | 0:ea85c4bb5e1f | 44 | } |
dan_ackme | 0:ea85c4bb5e1f | 45 | |
dan_ackme | 0:ea85c4bb5e1f | 46 |