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
sdk/mbed/sdk.h
- Committer:
- dan_ackme
- Date:
- 2014-08-11
- Revision:
- 0:ea85c4bb5e1f
- Child:
- 1:6ec9998427ad
File content as of revision 0:ea85c4bb5e1f:
/* * 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 #define MBED_SDK #include "mbed.h" namespace wiconnect { #define WICONNECT_ASYNC_TIMER_ENABLED #define WICONNECT_ENABLE_MALLOC #define WICONNECT_SERIAL_RX_BUFFER #define WICONNECT_USE_DEFAULT_STRING_BUFFERS #define WICONNECT_DEFAULT_MALLOC malloc #define WICONNECT_DEFAULT_FREE free #define WICONNECT_DEFAULT_BAUD 115200 #define WICONNECT_DEFAULT_TIMEOUT 3000 // ms #define WICONNECT_MAX_QUEUED_COMMANDS 8 #define WICONNECT_DEFAULT_COMMAND_PROCESSING_PERIOD 50 // ms #define WICONNECT_SOCKET_DEFAULT_RX_BUFFER_SIZE 256 #define WICONNECT_SOCKET_DEFAULT_TX_BUFFER_SIZE 256 #define WICONNECT_DEFAULT_NONBLOCKING false #define WICONNECT_GPIO_BASE_CLASS : DigitalOut #define WICONNECT_SERIAL_BASE_CLASS : RawSerial #define WICONNECT_PERIODIC_TIMER_BASE_CLASS : Ticker #define WICONNECT_EXTERNAL_INTERRUPT_GPIO_BASE_CLASS : InterruptIn #define WICONNECT_MAX_PIN_IRQ_HANDLERS 3 #define WICONNECT_MAX_HOST_SIZE 64 #define WICONNECT_MAX_FILENAME_SIZE 96 #define PIN_NC NC typedef PinName Pin; typedef struct _SerialConfig { Pin rx; Pin tx; Pin cts; Pin rts; int baud; void *serialRxBuffer; int serialRxBufferSize; _SerialConfig(Pin rx, Pin tx, Pin cts, Pin rts, int baud = WICONNECT_DEFAULT_BAUD, void *serialRxBuffer = NULL, int serialRxBufferSize = 0) { this->rx =rx; this->tx =tx; this->cts =cts; this->rts =rts; this->baud = baud; this->serialRxBuffer =serialRxBuffer; this->serialRxBufferSize =serialRxBufferSize; } _SerialConfig(Pin rx, Pin tx, int baud = WICONNECT_DEFAULT_BAUD) { this->rx =rx; this->tx =tx; this->cts =PIN_NC; this->rts =PIN_NC; this->baud = baud; this->serialRxBuffer =NULL; this->serialRxBufferSize =0; } } SerialConfig; #define delayMs(ms) wait_ms(ms) }