/** library to send data using ESP8266 WiFi SoC * @file * @author King Kévin * @copyright SPDX-License-Identifier: GPL-3.0-or-later * @date 2016-2022 * @note peripherals used: USART @ref radio_esp8266_usart */ #pragma once /** a response has been returned by the radio */ extern volatile bool radio_esp8266_activity; /** the last command has succeeded */ extern volatile bool radio_esp8266_success; /** setup peripherals to communicate with radio * @note this is blocking to ensure we are connected to the WiFi network */ void radio_esp8266_setup(void); /** establish TCP connection * @param[in] host host to connect to * @param[in] port TCP port to connect to * @note wait for activity to get success status */ void radio_esp8266_tcp_open(char* host, uint16_t port); /** send data (requires established connection) * @param[in] data data to send * @param[in] length size of data to send * @note wait for activity to get success status */ void radio_esp8266_send(uint8_t* data, uint8_t length); /** close established connection * @note wait for activity to get success status */ void radio_esp8266_close(void);