cc3000 hostdriver with the mbed socket interface
Dependents: cc3000_hello_world_demo cc3000_simple_socket_demo cc3000_ntp_demo cc3000_ping_demo ... more
cc3000_spi Class Reference
SPI communication layer. More...
#include <cc3000.h>
Public Member Functions | |
cc3000_spi (PinName cc3000_irq, PinName cc3000_en, PinName cc3000_cs, SPI cc3000_spi, cc3000_event &event, cc3000_simple_link &simple_link) | |
Ctor. | |
~cc3000_spi () | |
Dtor. | |
void | close () |
Close SPI - disables IRQ and set received buffer to 0. | |
void | open () |
Open the SPI interface. | |
uint32_t | first_write (uint8_t *buffer, uint16_t length) |
First SPI write after powerup (delay needed between SPI header and body) | |
uint32_t | write (uint8_t *buffer, uint16_t length) |
SPI Write function. | |
void | write_synchronous (uint8_t *data, uint16_t size) |
Low level SPI write. | |
void | read_synchronous (uint8_t *data, uint16_t size) |
Low level SPI read. | |
uint32_t | read_data_cont () |
Process the received SPI Header and in accordance with it - continue reading the packet. | |
void | wlan_irq_enable () |
Enable WLAN interrutp. | |
void | wlan_irq_disable () |
Disable WLAN interrutp. | |
uint32_t | wlan_irq_read () |
Get WLAN interrupt status. | |
void | WLAN_IRQHandler () |
SPI interrupt Handler. | |
void | set_wlan_en (uint8_t value) |
Enable/Disable the WLAN module. |
Detailed Description
SPI communication layer.
Definition at line 1071 of file cc3000.h.
Constructor & Destructor Documentation
cc3000_spi | ( | PinName | cc3000_irq, |
PinName | cc3000_en, | ||
PinName | cc3000_cs, | ||
SPI | cc3000_spi, | ||
cc3000_event & | event, | ||
cc3000_simple_link & | simple_link | ||
) |
Ctor.
- Parameters:
-
irq IRQ pin cc3000_en Enable pin cc3000_cs Chip select pin cc3000_spi SPI object irq_port Port for IRQ pin (needed for enable/disable interrupts) event Reference to the event object. simple_link Reference to the simple link object.
- Returns:
- none
Definition at line 46 of file cc3000_spi.cpp.
~cc3000_spi | ( | ) |
Member Function Documentation
void close | ( | ) |
Close SPI - disables IRQ and set received buffer to 0.
- Parameters:
-
none
- Returns:
- none
Definition at line 81 of file cc3000_spi.cpp.
uint32_t first_write | ( | uint8_t * | buffer, |
uint16_t | length | ||
) |
First SPI write after powerup (delay needed between SPI header and body)
- Parameters:
-
buffer pointer to write buffer length buffer length
- Returns:
- 0
Definition at line 92 of file cc3000_spi.cpp.
void open | ( | ) |
uint32_t read_data_cont | ( | ) |
Process the received SPI Header and in accordance with it - continue reading the packet.
- Parameters:
-
None
- Returns:
- 0
Definition at line 171 of file cc3000_spi.cpp.
void read_synchronous | ( | uint8_t * | data, |
uint16_t | size | ||
) |
Low level SPI read.
- Parameters:
-
data pointer to data buffer size number of bytes
- Returns:
- none
Definition at line 165 of file cc3000_spi.cpp.
void set_wlan_en | ( | uint8_t | value ) |
Enable/Disable the WLAN module.
- Parameters:
-
value 1 : Enable 0 : Disable
- Returns:
- None
Definition at line 211 of file cc3000_spi.cpp.
void wlan_irq_disable | ( | ) |
void wlan_irq_enable | ( | ) |
uint32_t wlan_irq_read | ( | ) |
Get WLAN interrupt status.
- Parameters:
-
None
- Returns:
- 0 : No interrupt occured 1 : Interrupt occured
Definition at line 77 of file cc3000_spi.cpp.
void WLAN_IRQHandler | ( | ) |
SPI interrupt Handler.
The external WLAN device asserts the IRQ line when data is ready.
The host CPU needs to acknowledges the IRQ by asserting CS.
- Parameters:
-
none
- Returns:
- none
Definition at line 219 of file cc3000_spi.cpp.
uint32_t write | ( | uint8_t * | buffer, |
uint16_t | length | ||
) |
SPI Write function.
- Parameters:
-
buffer pointer to write buffer length buffer length
- Returns:
- 0
Definition at line 107 of file cc3000_spi.cpp.
void write_synchronous | ( | uint8_t * | data, |
uint16_t | size | ||
) |
Low level SPI write.
- Parameters:
-
data pointer to data buffer size number of bytes
- Returns:
- none
Definition at line 158 of file cc3000_spi.cpp.
Generated on Tue Jul 12 2022 23:07:36 by 1.7.2