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: sdk/mbed/sdk.h
- Revision:
- 13:2b51f5267c92
- Parent:
- 11:ea484e1b7fc4
- Child:
- 16:7f1d6d359787
--- a/sdk/mbed/sdk.h Tue Aug 12 02:44:34 2014 -0700 +++ b/sdk/mbed/sdk.h Wed Aug 13 03:14:30 2014 -0700 @@ -96,17 +96,18 @@ #define PIN_NC NC /** - * @ingroup types_core + * @ingroup api_core_types * @brief Pin name on HOST */ typedef PinName Pin; /** - * @ingroup types_core + * @ingroup api_core_types * @brief Host<->Wiconnect Module serial configuration */ -typedef struct _SerialConfig +class SerialConfig { +public: Pin rx; Pin tx; Pin cts; @@ -115,7 +116,7 @@ void *serialRxBuffer; int serialRxBufferSize; - _SerialConfig(Pin rx, Pin tx, Pin cts, Pin rts, int baud = WICONNECT_DEFAULT_BAUD, int serialRxBufferSize = 0, void *serialRxBuffer = NULL) + SerialConfig(Pin rx, Pin tx, Pin cts, Pin rts, int baud, int serialRxBufferSize, void *serialRxBuffer = NULL) { this->rx =rx; this->tx =tx; @@ -126,18 +127,29 @@ this->serialRxBufferSize =serialRxBufferSize; } - _SerialConfig(Pin rx, Pin tx, int baud = WICONNECT_DEFAULT_BAUD) + SerialConfig(Pin rx, Pin tx, int serialRxBufferSize, void *serialRxBuffer = NULL) + { + this->rx =rx; + this->tx =tx; + this->cts = PIN_NC; + this->rts = PIN_NC; + this->baud = WICONNECT_DEFAULT_BAUD; + this->serialRxBuffer =serialRxBuffer; + this->serialRxBufferSize =serialRxBufferSize; + } + + SerialConfig(Pin rx, Pin tx) { this->rx =rx; this->tx =tx; this->cts =PIN_NC; this->rts =PIN_NC; - this->baud = baud; + this->baud = WICONNECT_DEFAULT_BAUD; this->serialRxBuffer =NULL; this->serialRxBufferSize =0; } -} SerialConfig; +}; /**