feat(modem): Support for pausing network in C-API

also adds a demo of this feature to pppos client example
This commit is contained in:
David Cermak
2024-12-05 20:16:45 +01:00
parent 247f1681e8
commit 1db83cd1ca
5 changed files with 45 additions and 1 deletions
@@ -160,6 +160,17 @@ esp_err_t esp_modem_set_apn(esp_modem_dce_t *dce, const char *apn);
esp_err_t esp_modem_set_urc(esp_modem_dce_t *dce, esp_err_t(*got_line_cb)(uint8_t *data, size_t len));
#endif
/**
* @brief This API provides support for temporarily pausing networking in order
* to send/receive AT commands and resume networking afterwards.
* @note This function does not switch modes, the modem is still in data mode.
*
* @param dce Modem DCE handle
* @param pause true to pause the network interface, false to resume networking
* @return ESP_OK on success
*/
esp_err_t esp_modem_pause_net(esp_modem_dce_t *dce, bool pause);
/**
* @}
*/