forked from espressif/esp-protocols
fix(modem): Use generated AT command definitions for IDE navigation
BREAKING CHANGE: inc headers for AT command definitions are no longer used directly, but pregenerated into *.h(pp)
This commit is contained in:
@@ -815,22 +815,22 @@ WARN_LOGFILE =
|
||||
# Note: If this tag is empty the current directory is searched.
|
||||
|
||||
INPUT = \
|
||||
$(PROJECT_PATH)/../components/esp_modem/include/esp_modem_api.h \
|
||||
$(PROJECT_PATH)/../components/esp_modem/command/include/esp_modem_api.h \
|
||||
$(PROJECT_PATH)/../components/esp_modem/include/esp_modem_c_api_types.h \
|
||||
$(PROJECT_PATH)/../components/esp_modem/include/cxx_include/esp_modem_api.hpp \
|
||||
$(PROJECT_PATH)/../components/esp_modem/include/esp_modem_config.h \
|
||||
$(PROJECT_PATH)/../components/esp_modem/include/esp_modem_dce_config.h \
|
||||
$(PROJECT_PATH)/../components/esp_modem/include/cxx_include/esp_modem_dce_factory.hpp \
|
||||
$(PROJECT_PATH)/../components/esp_modem/include/cxx_include/esp_modem_command_library.hpp \
|
||||
$(PROJECT_PATH)/../components/esp_modem/include/cxx_include/esp_modem_dce_module.hpp \
|
||||
$(PROJECT_PATH)/../components/esp_modem/command/include/cxx_include/esp_modem_command_library.hpp \
|
||||
$(PROJECT_PATH)/../components/esp_modem/command/include/cxx_include/esp_modem_dce_module.hpp \
|
||||
$(PROJECT_PATH)/../components/esp_modem/include/cxx_include/esp_modem_dte.hpp \
|
||||
$(PROJECT_PATH)/../components/esp_modem/include/cxx_include/esp_modem_netif.hpp \
|
||||
$(PROJECT_PATH)/../components/esp_modem/include/cxx_include/esp_modem_types.hpp \
|
||||
$(PROJECT_PATH)/../components/esp_modem/include/cxx_include/esp_modem_terminal.hpp \
|
||||
$(PROJECT_PATH)/../components/esp_modem/include/cxx_include/esp_modem_cmux.hpp \
|
||||
$(PROJECT_PATH)/../components/esp_modem/include/cxx_include/esp_modem_dce.hpp \
|
||||
$(PROJECT_PATH)/../docs/esp_modem/en/esp_modem_api_commands.h \
|
||||
$(PROJECT_PATH)/../docs/esp_modem/en/esp_modem_dce.hpp
|
||||
$(PROJECT_PATH)/../components/esp_modem/include/cxx_include/esp_modem_dce_template.hpp \
|
||||
$(PROJECT_PATH)/../docs/esp_modem/command/dce.h \
|
||||
$(PROJECT_PATH)/../docs/esp_modem/command/dce.hpp
|
||||
|
||||
|
||||
# The last two are generated
|
||||
|
@@ -45,7 +45,7 @@ Note that the functions which implement AT commands returning textual values use
|
||||
pointer as the return value. The API expects the output data to point to user allocated space of at least
|
||||
``CONFIG_ESP_MODEM_C_API_STR_MAX`` (128 by default) bytes, it also truncates the output data to this size.
|
||||
|
||||
.. doxygenfile:: esp_modem_api_commands.h
|
||||
.. doxygenfile:: dce.h
|
||||
|
||||
.. _api_config:
|
||||
|
||||
|
@@ -33,7 +33,10 @@ Mode switching commands
|
||||
Modem commands
|
||||
--------------
|
||||
|
||||
.. include:: cxx_api_links.rst
|
||||
.. include:: ../command/dce.rst
|
||||
|
||||
.. doxygenclass:: esp_modem::DCE
|
||||
:members:
|
||||
|
||||
.. _cpp_destroy:
|
||||
|
||||
|
6
docs/esp_modem/generate/dce.h
Normal file
6
docs/esp_modem/generate/dce.h
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
// --- ESP-MODEM command module starts here ---
|
||||
#include "esp_modem_command_declare_helper.inc"
|
||||
#define ESP_MODEM_DECLARE_DCE_COMMAND(name, return_type, ...) return_type esp_modem_ ## name (ESP_MODEM_COMMAND_PARAMS(__VA_ARGS__));
|
||||
|
||||
#include "esp_modem_command_declare.inc"
|
16
docs/esp_modem/generate/dce.hpp
Normal file
16
docs/esp_modem/generate/dce.hpp
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
// --- ESP-MODEM command module starts here ---
|
||||
class esp_modem::DCE : public DCE_T<GenericModule> {
|
||||
public:
|
||||
using DCE_T<GenericModule>::DCE_T;
|
||||
|
||||
#include "esp_modem_command_declare_helper.inc"
|
||||
#define ESP_MODEM_DECLARE_DCE_COMMAND(name, return_type, ...) \
|
||||
return_type name(ESP_MODEM_COMMAND_PARAMS(__VA_ARGS__));
|
||||
|
||||
|
||||
#include "esp_modem_command_declare.inc"
|
||||
|
||||
#undef ESP_MODEM_DECLARE_DCE_COMMAND
|
||||
|
||||
};
|
7
docs/esp_modem/generate/dce.rst
Normal file
7
docs/esp_modem/generate/dce.rst
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
// --- ESP-MODEM command module starts here ---
|
||||
|
||||
#define ESP_MODEM_DECLARE_DCE_COMMAND(name, return_type, ...) \
|
||||
* :cpp:func:`esp_modem::DCE::name`
|
||||
|
||||
#include "esp_modem_command_declare.inc"
|
@@ -3,15 +3,14 @@
|
||||
# Cleanup the generated html
|
||||
rm -rf html docs
|
||||
|
||||
# Generate C++ API header of the DCE
|
||||
cat ../../components/esp_modem/include/generate/esp_modem_command_declare.inc | clang++ -E -P -CC -xc++ -I../../components/esp_modem/include -DGENERATE_DOCS - | sed -n '1,/DCE command documentation/!p' > en/esp_modem_dce.hpp
|
||||
pushd `pwd`
|
||||
|
||||
# Generate C API header of the modem_api.h
|
||||
cat ../../components/esp_modem/include/generate/esp_modem_command_declare.inc | clang -E -P -CC -xc -I../../components/esp_modem/include -DGENERATE_DOCS - | sed -n '1,/DCE command documentation/!p' > en/esp_modem_api_commands.h
|
||||
cd ../../components/esp_modem/scripts
|
||||
./generate.sh ../../docs/esp_modem/generate/dce.rst
|
||||
./generate.sh ../../docs/esp_modem/generate/dce.hpp
|
||||
./generate.sh ../../docs/esp_modem/generate/dce.h
|
||||
|
||||
|
||||
# RST with links to C++ API
|
||||
cat ../../components/esp_modem/include/generate/esp_modem_command_declare.inc | clang -E -P -xc -I../../components/esp_modem/include -DGENERATE_DOCS -DGENERATE_RST_LINKS - | sed 's/NL/\n/g' > en/cxx_api_links.rst
|
||||
popd
|
||||
|
||||
build-docs --target esp32 --language en
|
||||
|
||||
|
Reference in New Issue
Block a user