cc3000 hostdriver with the mbed socket interface
Fork of cc3000_hostdriver_mbedsocket by
Diff: cc3000_simplelink.cpp
- Revision:
- 51:897cfc2c7e8c
- Parent:
- 45:50ab13d8f2dc
--- a/cc3000_simplelink.cpp Sun Apr 05 14:25:45 2015 +0000 +++ b/cc3000_simplelink.cpp Mon Apr 06 18:23:37 2015 +0000 @@ -44,13 +44,18 @@ namespace mbed_cc3000 { cc3000_simple_link::cc3000_simple_link() { - _rx_buffer[CC3000_RX_BUFFER_SIZE - 1] = CC3000_BUFFER_MAGIC_NUMBER; - _tx_buffer[CC3000_TX_BUFFER_SIZE - 1] = CC3000_BUFFER_MAGIC_NUMBER; } cc3000_simple_link::~cc3000_simple_link() { } +void cc3000_simple_link::create_txrx_buffers(uint32_t tx_size, uint32_t rx_size) { + _rx_buffer = new uint8_t[rx_size]; + _tx_buffer = new uint8_t[tx_size]; + _rx_buffer[rx_size - 1] = CC3000_BUFFER_MAGIC_NUMBER; + _tx_buffer[tx_size - 1] = CC3000_BUFFER_MAGIC_NUMBER; +} + uint8_t cc3000_simple_link::get_data_received_flag() { return _data_received_flag; }