ACKme Logo WiConnect Host Library- API Reference Guide
 
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
sdk.h
1 
29 #pragma once
30 
31 
32 #define MBED_SDK
33 
34 #include "mbed.h"
35 
36 
37 
38 
39 namespace wiconnect
40 {
41 
48 #define WICONNECT_MINIMUM_VERSION FILE_MAKE_VERSION(2, 0, 0, 11)
49 
54 #define WICONNECT_ASYNC_TIMER_ENABLED
55 
59 #define WICONNECT_ENABLE_MALLOC
60 
64 #define WICONNECT_SERIAL_RX_BUFFER
65 
69 #define WICONNECT_USE_DEFAULT_STRING_BUFFERS
70 
75 #define WICONNECT_GPIO_IRQ_ENABLED
76 
81 #define WICONNECT_DEFAULT_MALLOC malloc
82 
86 #define WICONNECT_DEFAULT_FREE free
87 
92 #define WICONNECT_DEFAULT_BAUD 115200
93 
97 #define WICONNECT_DEFAULT_TIMEOUT 3000 // ms
98 
102 #define WICONNECT_MAX_QUEUED_COMMANDS 8
103 
107 #define WICONNECT_DEFAULT_COMMAND_PROCESSING_PERIOD 50 // ms
108 
113 #define WICONNECT_DEFAULT_NONBLOCKING false
114 
119 #define WICONNECT_ENABLE_DEBUGGING
120 
121 
122 // ----------------------------------------------------------------------------
123 
124 #define WICONNECT_GPIO_BASE_CLASS : DigitalOut
125 #define WICONNECT_SERIAL_BASE_CLASS : RawSerial
126 #define WICONNECT_PERIODIC_TIMER_BASE_CLASS : Ticker
127 #define WICONNECT_EXTERNAL_INTERRUPT_GPIO_BASE_CLASS : InterruptIn
128 
129 #define WICONNECT_MAX_PIN_IRQ_HANDLERS 3
130 
131 
136 #define PIN_NC NC
137 
142 typedef PinName Pin;
143 
149 {
150 public:
151  Pin rx;
152  Pin tx;
153  Pin cts;
154  Pin rts;
155  int baud;
156  void *serialRxBuffer;
157  int serialRxBufferSize;
158 
159  SerialConfig(Pin rx, Pin tx, Pin cts, Pin rts, int baud, int serialRxBufferSize, void *serialRxBuffer = NULL)
160  {
161  this->rx =rx;
162  this->tx =tx;
163  this->cts =cts;
164  this->rts =rts;
165  this->baud = baud;
166  this->serialRxBuffer =serialRxBuffer;
167  this->serialRxBufferSize =serialRxBufferSize;
168  }
169 
170  SerialConfig(Pin rx, Pin tx, int serialRxBufferSize, void *serialRxBuffer = NULL)
171  {
172  this->rx =rx;
173  this->tx =tx;
174  this->cts = PIN_NC;
175  this->rts = PIN_NC;
176  this->baud = WICONNECT_DEFAULT_BAUD;
177  this->serialRxBuffer =serialRxBuffer;
178  this->serialRxBufferSize =serialRxBufferSize;
179  }
180 
181  SerialConfig(Pin rx, Pin tx)
182  {
183  this->rx =rx;
184  this->tx =tx;
185  this->cts =PIN_NC;
186  this->rts =PIN_NC;
187  this->baud = WICONNECT_DEFAULT_BAUD;
188  this->serialRxBuffer =NULL;
189  this->serialRxBufferSize =0;
190  }
191 
192 };
193 
194 
199 #define delayMs(ms) wait_ms(ms)
200 
201 
202 
203 
204 }
Host<->Wiconnect Module serial configuration.
Definition: sdk.h:148
PinName Pin
Pin name on HOST.
Definition: sdk.h:142
#define WICONNECT_DEFAULT_BAUD
The default Host<->Wiconnect Module serial BAUD rate.
Definition: sdk.h:92
#define PIN_NC
Default value for a pin, Not connected.
Definition: sdk.h:136