cc3000 hostdriver with the mbed socket interface
Dependents: cc3000_hello_world_demo cc3000_simple_socket_demo cc3000_ntp_demo cc3000_ping_demo ... more
Diff: cc3000_spi.cpp
- Revision:
- 44:960b73df5981
- Parent:
- 42:bd2c631a031a
- Child:
- 45:50ab13d8f2dc
diff -r 864437b6c058 -r 960b73df5981 cc3000_spi.cpp
--- a/cc3000_spi.cpp Sat Oct 12 23:28:22 2013 +0000
+++ b/cc3000_spi.cpp Sun Oct 13 11:46:21 2013 +0200
@@ -63,9 +63,10 @@
void cc3000_spi::wlan_irq_enable()
{
NVIC_EnableIRQ(_irq_port);
-
- if(wlan_irq_read() == 0)
- WLAN_IRQHandler();
+
+ if(wlan_irq_read() == 0) {
+ WLAN_IRQHandler();
+ }
}
void cc3000_spi::wlan_irq_disable() {
@@ -80,25 +81,10 @@
wlan_irq_disable();
}
-// void cc3000_spi::SpiReceiveHandler() {
-// _simple_link.usEventOrDataReceived = 1;
-// //_simple_link.pucReceivedData = (unsigned char *)pvBuffer;
-
-// hci_unsolicited_event_handler();
-// }
-
-
-/* TODO
- pRxPacket, pTxPacket do we need to hold this pointer ?
- SPIRxHandler - remove?
-*/
void cc3000_spi::open() {
_spi_info.spi_state = eSPI_STATE_POWERUP;
- //_spi_info.SPIRxHandler = pfRxHandler;
_spi_info.tx_packet_length = 0;
_spi_info.rx_packet_length = 0;
- //_rx_buffer[CC3000_RX_BUFFER_SIZE - 1] = CC3000_BUFFER_MAGIC_NUMBER;
- //_tx_buffer[CC3000_TX_BUFFER_SIZE - 1] = CC3000_BUFFER_MAGIC_NUMBER;
wlan_irq_enable();
}
SimpleLink Wi-Fi CC3000
Avnet Wi-Go System