diff --git a/esp_modem/docs/cxx_api_links.rst b/esp_modem/docs/cxx_api_links.rst index d903010fe..73d33092c 100644 --- a/esp_modem/docs/cxx_api_links.rst +++ b/esp_modem/docs/cxx_api_links.rst @@ -1,4 +1,7 @@ +- :cpp:func:`esp_modem::DCE::sync` +- :cpp:func:`esp_modem::DCE::get_operator_name` +- :cpp:func:`esp_modem::DCE::store_profile` - :cpp:func:`esp_modem::DCE::set_pin` - :cpp:func:`esp_modem::DCE::read_pin` - :cpp:func:`esp_modem::DCE::set_echo` @@ -13,4 +16,10 @@ - :cpp:func:`esp_modem::DCE::get_imei` - :cpp:func:`esp_modem::DCE::get_module_name` - :cpp:func:`esp_modem::DCE::set_data_mode` -- :cpp:func:`esp_modem::DCE::get_signal_quality` +- :cpp:func:`esp_modem::DCE::get_signal_quality` +- :cpp:func:`esp_modem::DCE::set_flow_control` +- :cpp:func:`esp_modem::DCE::hang_up` +- :cpp:func:`esp_modem::DCE::get_battery_status` +- :cpp:func:`esp_modem::DCE::power_down` +- :cpp:func:`esp_modem::DCE::reset` +- :cpp:func:`esp_modem::DCE::set_baud` diff --git a/esp_modem/docs/esp_modem_api_commands.h b/esp_modem/docs/esp_modem_api_commands.h index 12d8a9627..1d14f91e2 100644 --- a/esp_modem/docs/esp_modem_api_commands.h +++ b/esp_modem/docs/esp_modem_api_commands.h @@ -6,6 +6,16 @@ // --- DCE command documentation starts here --- /** + * @brief Sends the initial AT sequence to sync up with the device + * @return OK, FAIL or TIMEOUT + */ command_result esp_modem_sync (); /** + * @brief Reads the operator name + * @param[out] name module name + * @return OK, FAIL or TIMEOUT + */ command_result esp_modem_get_operator_name (char* name); /** + * @brief Stores current user profile + * @return OK, FAIL or TIMEOUT + */ command_result esp_modem_store_profile (); /** * @brief Sets the supplied PIN code * @param[in] pin Pin * @return OK, FAIL or TIMEOUT @@ -62,4 +72,28 @@ * @param[out] rssi signal strength indication * @param[out] ber channel bit error rate * @return OK, FAIL or TIMEOUT - */ command_result esp_modem_get_signal_quality (int* rssi, int* ber); + */ command_result esp_modem_get_signal_quality (int* rssi, int* ber); /** + * @brief Sets HW control flow + * @param[in] dce_flow 0=none, 2=RTS hw flow control of DCE + * @param[in] dte_flow 0=none, 2=CTS hw flow control of DTE + * @return OK, FAIL or TIMEOUT + */ command_result esp_modem_set_flow_control (int dce_flow, int dte_flow); /** + * @brief Hangs up current data call + * @return OK, FAIL or TIMEOUT + */ command_result esp_modem_hang_up (); /** + * @brief Get voltage levels of modem power up circuitry + * @param[out] voltage Current status in mV + * @param[out] bcs charge status (-1-Not available, 0-Not charging, 1-Charging, 2-Charging done) + * @param[out] bcl 1-100% battery capacity, -1-Not available + * @return OK, FAIL or TIMEOUT + */ command_result esp_modem_get_battery_status (int* voltage, int* bcs, int* bcl); /** + * @brief Power down the module + * @return OK, FAIL or TIMEOUT + */ command_result esp_modem_power_down (); /** + * @brief Reset the module + * @return OK, FAIL or TIMEOUT + */ command_result esp_modem_reset (); /** + * @brief Configures the baudrate + * @param[in] baud Desired baud rate of the DTE + * @return OK, FAIL or TIMEOUT + */ command_result esp_modem_set_baud (int baud); diff --git a/esp_modem/docs/esp_modem_dce.hpp b/esp_modem/docs/esp_modem_dce.hpp index 2610a7158..3ad40854d 100644 --- a/esp_modem/docs/esp_modem_dce.hpp +++ b/esp_modem/docs/esp_modem_dce.hpp @@ -17,6 +17,16 @@ public: /** + * @brief Sends the initial AT sequence to sync up with the device + * @return OK, FAIL or TIMEOUT + */ command_result sync (); /** + * @brief Reads the operator name + * @param[out] name module name + * @return OK, FAIL or TIMEOUT + */ command_result get_operator_name (std::string& name); /** + * @brief Stores current user profile + * @return OK, FAIL or TIMEOUT + */ command_result store_profile (); /** * @brief Sets the supplied PIN code * @param[in] pin Pin * @return OK, FAIL or TIMEOUT @@ -73,5 +83,29 @@ public: * @param[out] rssi signal strength indication * @param[out] ber channel bit error rate * @return OK, FAIL or TIMEOUT - */ command_result get_signal_quality (int& rssi, int& ber); + */ command_result get_signal_quality (int& rssi, int& ber); /** + * @brief Sets HW control flow + * @param[in] dce_flow 0=none, 2=RTS hw flow control of DCE + * @param[in] dte_flow 0=none, 2=CTS hw flow control of DTE + * @return OK, FAIL or TIMEOUT + */ command_result set_flow_control (int dce_flow, int dte_flow); /** + * @brief Hangs up current data call + * @return OK, FAIL or TIMEOUT + */ command_result hang_up (); /** + * @brief Get voltage levels of modem power up circuitry + * @param[out] voltage Current status in mV + * @param[out] bcs charge status (-1-Not available, 0-Not charging, 1-Charging, 2-Charging done) + * @param[out] bcl 1-100% battery capacity, -1-Not available + * @return OK, FAIL or TIMEOUT + */ command_result get_battery_status (int& voltage, int& bcs, int& bcl); /** + * @brief Power down the module + * @return OK, FAIL or TIMEOUT + */ command_result power_down (); /** + * @brief Reset the module + * @return OK, FAIL or TIMEOUT + */ command_result reset (); /** + * @brief Configures the baudrate + * @param[in] baud Desired baud rate of the DTE + * @return OK, FAIL or TIMEOUT + */ command_result set_baud (int baud); }; diff --git a/esp_modem/docs/generate_docs b/esp_modem/docs/generate_docs index 0e007ada5..c6e70a0e5 100755 --- a/esp_modem/docs/generate_docs +++ b/esp_modem/docs/generate_docs @@ -1,6 +1,9 @@ # Cleanup the generated html rm -rf html +# Cleans example and test build dirs (to reduce the component size before upload) +rm -rf ../examples/ap_to_pppos/build/ ../examples/simple_cxx_client/build/ ../examples/pppos_client/build/ ../examples/modem_console/build ../test/host_test/build/ ../test/target/build/ + # Generate C++ API header of the DCE cat ../include/generate/esp_modem_command_declare.inc | clang++ -E -P -CC -xc++ -I../include -DGENERATE_DOCS - | sed -n '1,/DCE command documentation/!p' > esp_modem_dce.hpp diff --git a/esp_modem/idf_component.yml b/esp_modem/idf_component.yml index 74a00dd3d..a29e66c72 100644 --- a/esp_modem/idf_component.yml +++ b/esp_modem/idf_component.yml @@ -1,4 +1,4 @@ -version: "0.1.2" +version: "0.1.3" targets: - esp32 description: esp modem