esp8266: add reset function
This commit is contained in:
parent
cfc6c509b7
commit
ac7b075b1c
@ -122,7 +122,19 @@ void radio_esp8266_setup(void)
|
||||
while (!radio_esp8266_activity || !radio_esp8266_success) { // wait for response
|
||||
__WFI(); // sleep until something happened
|
||||
}
|
||||
radio_esp8266_transmit((uint8_t*)"AT+RST\r\n", 8); // reset module
|
||||
radio_esp8266_transmit_at("E0"); // disable echoing
|
||||
while (!radio_esp8266_activity || !radio_esp8266_success) { // wait for response
|
||||
__WFI(); // sleep until something happened
|
||||
}
|
||||
}
|
||||
|
||||
void radio_esp8266_reset(void)
|
||||
{
|
||||
radio_esp8266_transmit_at("+RST"); // reset module
|
||||
while (!radio_esp8266_activity || !radio_esp8266_success) { // wait for response
|
||||
__WFI(); // sleep until something happened
|
||||
}
|
||||
radio_esp8266_transmit_at("E0"); // disable echoing
|
||||
while (!radio_esp8266_activity || !radio_esp8266_success) { // wait for response
|
||||
__WFI(); // sleep until something happened
|
||||
}
|
||||
|
@ -20,6 +20,8 @@ extern uint16_t radio_esp8266_received_len;
|
||||
* @note this is blocking to ensure we are connected to the WiFi network
|
||||
*/
|
||||
void radio_esp8266_setup(void);
|
||||
/** reset ESP */
|
||||
void radio_esp8266_reset(void);
|
||||
/** establish TCP connection
|
||||
* @param[in] host host to connect to
|
||||
* @param[in] port TCP port to connect to
|
||||
|
Loading…
Reference in New Issue
Block a user