CuVoodoo STM32F1 firmware template
|
library to send data using ESP8266 WiFi SoC (code) More...
Go to the source code of this file.
Macros | |
#define | RADIO_ESP8266_USART 2 |
USART peripheral. | |
Functions | |
static void | radio_esp8266_transmit (uint8_t *data, uint8_t length) |
transmit data to radio More... | |
void | radio_esp8266_setup (void) |
setup peripherals to communicate with radio More... | |
void | radio_esp8266_tcp_open (char *host, uint16_t port) |
establish TCP connection More... | |
void | radio_esp8266_send (uint8_t *data, uint8_t length) |
send data (requires established connection) More... | |
void | radio_esp8266_close (void) |
close established connection More... | |
void USART_ISR() | RADIO_ESP8266_USART (void) |
USART interrupt service routine called when data has been transmitted or received. | |
Variables | |
static uint8_t | rx_buffer [24] = {0} |
buffer for received data (we only expect AT responses) | |
static volatile uint16_t | rx_used = 0 |
number of byte in receive buffer | |
static uint8_t | tx_buffer [256] = {0} |
buffer for data to transmit | |
static volatile uint16_t | tx_used = 0 |
number of bytes used in transmit buffer | |
volatile bool | radio_esp8266_activity = false |
a response has been returned by the radio | |
volatile bool | radio_esp8266_success = false |
the last command has succeeded | |
library to send data using ESP8266 WiFi SoC (code)
Definition in file radio_esp8266.c.
void radio_esp8266_close | ( | void | ) |
close established connection
Definition at line 142 of file radio_esp8266.c.
void radio_esp8266_send | ( | uint8_t * | data, |
uint8_t | length | ||
) |
send data (requires established connection)
[in] | data | data to send |
[in] | length | size of data to send |
Definition at line 126 of file radio_esp8266.c.
void radio_esp8266_setup | ( | void | ) |
setup peripherals to communicate with radio
Definition at line 72 of file radio_esp8266.c.
void radio_esp8266_tcp_open | ( | char * | host, |
uint16_t | port | ||
) |
establish TCP connection
[in] | host | host to connect to |
[in] | port | TCP port to connect to |
Definition at line 117 of file radio_esp8266.c.
|
static |
transmit data to radio
[in] | data | data to transmit |
[in] | length | length of data to transmit |
Definition at line 57 of file radio_esp8266.c.