version_2.0
Dependents: cc3000_ping_demo_try_2
Fork of cc3000_hostdriver_mbedsocket by
Diff: cc3000_spi.cpp
- Revision:
- 44:960b73df5981
- Parent:
- 42:bd2c631a031a
- Child:
- 45:50ab13d8f2dc
--- 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(); }