diff --git a/components/esp_modem/examples/ap_to_pppos/main/network_dce.h b/components/esp_modem/examples/ap_to_pppos/main/network_dce.h index 54cd6718e..4d9e3c23f 100644 --- a/components/esp_modem/examples/ap_to_pppos/main/network_dce.h +++ b/components/esp_modem/examples/ap_to_pppos/main/network_dce.h @@ -7,8 +7,7 @@ CONDITIONS OF ANY KIND, either express or implied. */ -#ifndef _NETWORK_DCE_H_ -#define _NETWORK_DCE_H_ +#pragma once #ifdef __cplusplus extern "C" { @@ -43,5 +42,3 @@ void modem_stop_network(); #ifdef __cplusplus } #endif - -#endif //_NETWORK_DCE_H_ diff --git a/components/esp_modem/examples/modem_console/main/console_helper.hpp b/components/esp_modem/examples/modem_console/main/console_helper.hpp index c5e8b718d..3a6b698d0 100644 --- a/components/esp_modem/examples/modem_console/main/console_helper.hpp +++ b/components/esp_modem/examples/modem_console/main/console_helper.hpp @@ -7,8 +7,7 @@ CONDITIONS OF ANY KIND, either express or implied. */ -#ifndef MODEM_CONSOLE_CONSOLE_HELPER_H -#define MODEM_CONSOLE_CONSOLE_HELPER_H +#pragma once #include #include @@ -112,5 +111,3 @@ private: std::function func; const static esp_console_cmd_func_t command_func_pts[]; }; - -#endif //MODEM_CONSOLE_CONSOLE_HELPER_H diff --git a/components/esp_modem/examples/modem_console/main/my_module_dce.hpp b/components/esp_modem/examples/modem_console/main/my_module_dce.hpp index e111b7112..a6aa8eb20 100644 --- a/components/esp_modem/examples/modem_console/main/my_module_dce.hpp +++ b/components/esp_modem/examples/modem_console/main/my_module_dce.hpp @@ -7,8 +7,7 @@ CONDITIONS OF ANY KIND, either express or implied. */ -#ifndef __MY_MODULE_DCE_HPP__ -#define __MY_MODULE_DCE_HPP__ +#pragma once #include "cxx_include/esp_modem_dce_factory.hpp" @@ -38,6 +37,3 @@ std::unique_ptr create_shiny_dce(const esp_modem::dce_config *co { return esp_modem::dce_factory::Factory::build_unique(config, std::move(dte), netif); } - - -#endif //__MY_MODULE_DCE_HPP__ \ No newline at end of file diff --git a/components/esp_modem/examples/simple_cmux_client/main/simple_mqtt_client.hpp b/components/esp_modem/examples/simple_cmux_client/main/simple_mqtt_client.hpp index ca3d564af..63e280e45 100644 --- a/components/esp_modem/examples/simple_cmux_client/main/simple_mqtt_client.hpp +++ b/components/esp_modem/examples/simple_cmux_client/main/simple_mqtt_client.hpp @@ -6,8 +6,7 @@ software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -#ifndef _SIMPLE_MQTT_CLIENT_H_ -#define _SIMPLE_MQTT_CLIENT_H_ +#pragma once #include #include @@ -72,6 +71,3 @@ public: private: std::unique_ptr h; }; - - -#endif //_SIMPLE_MQTT_CLIENT_H_ diff --git a/components/esp_modem/include/cxx_include/esp_modem_api.hpp b/components/esp_modem/include/cxx_include/esp_modem_api.hpp index 87d25a668..844df3ed6 100644 --- a/components/esp_modem/include/cxx_include/esp_modem_api.hpp +++ b/components/esp_modem/include/cxx_include/esp_modem_api.hpp @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef _ESP_MODEM_API_HPP_ -#define _ESP_MODEM_API_HPP_ +#pragma once #include #include "cxx_include/esp_modem_dce.hpp" @@ -103,5 +102,3 @@ std::unique_ptr create_generic_dce(const dce_config *config, std::shared_pt */ } // namespace esp_modem - -#endif // _ESP_MODEM_API_HPP_ \ No newline at end of file diff --git a/components/esp_modem/include/cxx_include/esp_modem_cmux.hpp b/components/esp_modem/include/cxx_include/esp_modem_cmux.hpp index a8d075490..259ecdbe1 100644 --- a/components/esp_modem/include/cxx_include/esp_modem_cmux.hpp +++ b/components/esp_modem/include/cxx_include/esp_modem_cmux.hpp @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef _ESP_MODEM_CMUX_HPP_ -#define _ESP_MODEM_CMUX_HPP_ +#pragma once #include "esp_modem_terminal.hpp" @@ -108,5 +107,3 @@ private: */ } // namespace esp_modem - -#endif // _ESP_MODEM_CMUX_HPP_ diff --git a/components/esp_modem/include/cxx_include/esp_modem_command_library.hpp b/components/esp_modem/include/cxx_include/esp_modem_command_library.hpp index 805470b7c..fd32e97a1 100644 --- a/components/esp_modem/include/cxx_include/esp_modem_command_library.hpp +++ b/components/esp_modem/include/cxx_include/esp_modem_command_library.hpp @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef _ESP_MODEM_COMMAND_LIBRARY_HPP_ -#define _ESP_MODEM_COMMAND_LIBRARY_HPP_ +#pragma once #include "esp_modem_dte.hpp" #include "esp_modem_dce_module.hpp" @@ -55,5 +54,3 @@ command_result set_data_mode_sim8xx(CommandableIf* t); } // dce_commands } // esp_modem - -#endif //_ESP_MODEM_COMMAND_LIBRARY_HPP_ diff --git a/components/esp_modem/include/cxx_include/esp_modem_dce.hpp b/components/esp_modem/include/cxx_include/esp_modem_dce.hpp index 47b2d4b23..70452bf03 100644 --- a/components/esp_modem/include/cxx_include/esp_modem_dce.hpp +++ b/components/esp_modem/include/cxx_include/esp_modem_dce.hpp @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef _ESP_MODEM_DCE_HPP_ -#define _ESP_MODEM_DCE_HPP_ +#pragma once #include #include "cxx_include/esp_modem_netif.hpp" @@ -110,5 +109,3 @@ public: */ } // esp_modem - -#endif // _ESP_MODEM_DCE_HPP_ \ No newline at end of file diff --git a/components/esp_modem/include/cxx_include/esp_modem_dce_factory.hpp b/components/esp_modem/include/cxx_include/esp_modem_dce_factory.hpp index 9c8ad84ba..d3d6ddca4 100644 --- a/components/esp_modem/include/cxx_include/esp_modem_dce_factory.hpp +++ b/components/esp_modem/include/cxx_include/esp_modem_dce_factory.hpp @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef _ESP_MODEM_DCE_FACTORY_HPP_ -#define _ESP_MODEM_DCE_FACTORY_HPP_ +#pragma once /** * @defgroup ESP_MODEM_DCE_FACTORY @@ -244,6 +243,3 @@ protected: */ } // namespace esp_modem::dce_factory - - -#endif // _ESP_MODEM_DCE_FACTORY_HPP_ diff --git a/components/esp_modem/include/cxx_include/esp_modem_dce_module.hpp b/components/esp_modem/include/cxx_include/esp_modem_dce_module.hpp index 62e826dc3..f20893403 100644 --- a/components/esp_modem/include/cxx_include/esp_modem_dce_module.hpp +++ b/components/esp_modem/include/cxx_include/esp_modem_dce_module.hpp @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef _ESP_MODEM_DCE_MODULE_ -#define _ESP_MODEM_DCE_MODULE_ +#pragma once #include #include @@ -146,5 +145,3 @@ public: */ } // namespace esp_modem - -#endif // _ESP_MODEM_DCE_MODULE_ \ No newline at end of file diff --git a/components/esp_modem/include/cxx_include/esp_modem_dte.hpp b/components/esp_modem/include/cxx_include/esp_modem_dte.hpp index 65839c0ac..c505b2ed1 100644 --- a/components/esp_modem/include/cxx_include/esp_modem_dte.hpp +++ b/components/esp_modem/include/cxx_include/esp_modem_dte.hpp @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef _ESP_MODEM_DTE_HPP_ -#define _ESP_MODEM_DTE_HPP_ +#pragma once #include #include @@ -117,5 +116,3 @@ private: */ } // namespace esp_modem - -#endif // _ESP_MODEM_DTE_HPP_ diff --git a/components/esp_modem/include/cxx_include/esp_modem_exception.hpp b/components/esp_modem/include/cxx_include/esp_modem_exception.hpp index d696bfd22..8ae61b145 100644 --- a/components/esp_modem/include/cxx_include/esp_modem_exception.hpp +++ b/components/esp_modem/include/cxx_include/esp_modem_exception.hpp @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef _ESP_MODEM_EXCEPTION_HPP_ -#define _ESP_MODEM_EXCEPTION_HPP_ +#pragma once #include #include "esp_err.h" @@ -62,5 +61,3 @@ static inline void throw_if_esp_fail(esp_err_t err) } } // namespace esp_modem - -#endif //_ESP_MODEM_EXCEPTION_HPP_ diff --git a/components/esp_modem/include/cxx_include/esp_modem_netif.hpp b/components/esp_modem/include/cxx_include/esp_modem_netif.hpp index d44f55c4e..4f3bc64eb 100644 --- a/components/esp_modem/include/cxx_include/esp_modem_netif.hpp +++ b/components/esp_modem/include/cxx_include/esp_modem_netif.hpp @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef _ESP_MODEM_NETIF_HPP -#define _ESP_MODEM_NETIF_HPP +#pragma once #include #include @@ -85,5 +84,3 @@ private: */ } // namespace esp_modem - -#endif // _ESP_MODEM_NETIF_HPP diff --git a/components/esp_modem/include/cxx_include/esp_modem_primitives.hpp b/components/esp_modem/include/cxx_include/esp_modem_primitives.hpp index 4dcef99b3..8665762a7 100644 --- a/components/esp_modem/include/cxx_include/esp_modem_primitives.hpp +++ b/components/esp_modem/include/cxx_include/esp_modem_primitives.hpp @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef _ESP_MODEM_PRIMITIVES_HPP_ -#define _ESP_MODEM_PRIMITIVES_HPP_ +#pragma once #include "esp_event.h" #include "esp_modem_exception.hpp" @@ -104,5 +103,3 @@ private: }; } // namespace esp_modem - -#endif // _ESP_MODEM_PRIMITIVES_HPP_ diff --git a/components/esp_modem/include/cxx_include/esp_modem_terminal.hpp b/components/esp_modem/include/cxx_include/esp_modem_terminal.hpp index 5a77d0e6b..d9e7f5da3 100644 --- a/components/esp_modem/include/cxx_include/esp_modem_terminal.hpp +++ b/components/esp_modem/include/cxx_include/esp_modem_terminal.hpp @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef _ESP_MODEM_TERMINAL_HPP_ -#define _ESP_MODEM_TERMINAL_HPP_ +#pragma once #include #include @@ -85,5 +84,3 @@ protected: */ } // namespace esp_modem - -#endif // _ESP_MODEM_TERMINAL_HPP_ diff --git a/components/esp_modem/include/cxx_include/esp_modem_types.hpp b/components/esp_modem/include/cxx_include/esp_modem_types.hpp index 8d3a2c0af..722d3f85f 100644 --- a/components/esp_modem/include/cxx_include/esp_modem_types.hpp +++ b/components/esp_modem/include/cxx_include/esp_modem_types.hpp @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef _ESP_MODEM_TYPES_HPP_ -#define _ESP_MODEM_TYPES_HPP_ +#pragma once #include #include @@ -103,5 +102,3 @@ public: */ } // namespace esp_modem - -#endif // _ESP_MODEM_TYPES_HPP_ diff --git a/components/esp_modem/include/esp_modem_api.h b/components/esp_modem/include/esp_modem_api.h index b56362c9e..b28b57f62 100644 --- a/components/esp_modem/include/esp_modem_api.h +++ b/components/esp_modem/include/esp_modem_api.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef _ESP_MODEM_API_H_ -#define _ESP_MODEM_API_H_ +#pragma once #include "esp_err.h" #include "generate/esp_modem_command_declare.inc" @@ -35,6 +34,3 @@ DECLARE_ALL_COMMAND_APIS(declares esp_modem_(esp_modem_t * dce, ...);) #ifdef __cplusplus } #endif - - -#endif // _CLIENT_ESP_MODEM_API_H_ diff --git a/components/esp_modem/include/esp_modem_c_api_types.h b/components/esp_modem/include/esp_modem_c_api_types.h index eb655022e..d02cf2f8e 100644 --- a/components/esp_modem/include/esp_modem_c_api_types.h +++ b/components/esp_modem/include/esp_modem_c_api_types.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef _ESP_MODEM_C_API_TYPES_H_ -#define _ESP_MODEM_C_API_TYPES_H_ +#pragma once #include "esp_modem_config.h" @@ -98,5 +97,3 @@ esp_err_t esp_modem_set_mode(esp_modem_dce_t * dce, esp_modem_dce_mode_t mode); #ifdef __cplusplus } #endif - -#endif //_ESP_MODEM_C_API_TYPES_H_ diff --git a/components/esp_modem/include/esp_modem_config.h b/components/esp_modem/include/esp_modem_config.h index de1c79a25..a33733324 100644 --- a/components/esp_modem/include/esp_modem_config.h +++ b/components/esp_modem/include/esp_modem_config.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef _ESP_MODEM_CONFIG_H_ -#define _ESP_MODEM_CONFIG_H_ +#pragma once + #include "driver/uart.h" #include "esp_modem_dce_config.h" @@ -126,5 +126,3 @@ typedef struct esp_modem_dte_config esp_modem_dte_config_t; #ifdef __cplusplus } #endif - -#endif // _ESP_MODEM_CONFIG_H_ diff --git a/components/esp_modem/include/esp_modem_dce_config.h b/components/esp_modem/include/esp_modem_dce_config.h index 53db234dc..aa523316e 100644 --- a/components/esp_modem/include/esp_modem_dce_config.h +++ b/components/esp_modem/include/esp_modem_dce_config.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef _ESP_MODEM_DCE_CONFIG_H_ -#define _ESP_MODEM_DCE_CONFIG_H_ +#pragma once #ifdef __cplusplus extern "C" { @@ -48,5 +47,3 @@ struct esp_modem_dce_config { #ifdef __cplusplus } #endif - -#endif // _ESP_MODEM_DCE_CONFIG_H_ diff --git a/components/esp_modem/include/vfs_resource/vfs_create.hpp b/components/esp_modem/include/vfs_resource/vfs_create.hpp index 03e11e36b..bd29d68c7 100644 --- a/components/esp_modem/include/vfs_resource/vfs_create.hpp +++ b/components/esp_modem/include/vfs_resource/vfs_create.hpp @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef _VFS_CREATE_HPP_ -#define _VFS_CREATE_HPP_ +#pragma once #define ESP_MODEM_VFS_DEFAULT_UART_CONFIG(name) { \ .dev_name = (name), \ @@ -67,6 +66,3 @@ bool vfs_create_socket(struct esp_modem_vfs_socket_creator *config, struct esp_m * @return true on success */ bool vfs_create_uart(struct esp_modem_vfs_uart_creator *config, struct esp_modem_vfs_term_config *created_config); - - -#endif //_VFS_CREATE_HPP_ diff --git a/components/esp_modem/port/linux/esp_event_mock/include/esp_event.h b/components/esp_modem/port/linux/esp_event_mock/include/esp_event.h index 8d21a1a81..da948935b 100644 --- a/components/esp_modem/port/linux/esp_event_mock/include/esp_event.h +++ b/components/esp_modem/port/linux/esp_event_mock/include/esp_event.h @@ -11,8 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef MDNS_HOST_ESP_EVENT_H -#define MDNS_HOST_ESP_EVENT_H +#pragma once #include #include "esp_netif.h" @@ -39,5 +38,3 @@ esp_err_t esp_event_handler_register(const char * event_base, int32_t event_id, esp_err_t esp_event_handler_unregister(const char * event_base, int32_t event_id, void* event_handler); typedef void * QueueHandle_t; - -#endif //MDNS_HOST_ESP_EVENT_H diff --git a/components/esp_modem/port/linux/esp_event_mock/include/esp_event_base.h b/components/esp_modem/port/linux/esp_event_mock/include/esp_event_base.h index fa24de86b..fdb58e635 100644 --- a/components/esp_modem/port/linux/esp_event_mock/include/esp_event_base.h +++ b/components/esp_modem/port/linux/esp_event_mock/include/esp_event_base.h @@ -11,8 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef MDNS_HOST_ESP_EVENT_BASE_H -#define MDNS_HOST_ESP_EVENT_BASE_H +#pragma once typedef enum { WIFI_EVENT_STA_CONNECTED, /**< ESP32 station connected to AP */ @@ -25,4 +24,3 @@ typedef enum { typedef void * esp_event_base_t; -#endif //MDNS_HOST_ESP_EVENT_BASE_H diff --git a/components/esp_modem/port/linux/esp_netif_linux/include/esp_netif.h b/components/esp_modem/port/linux/esp_netif_linux/include/esp_netif.h index c404e59cd..df6c0a9c4 100644 --- a/components/esp_modem/port/linux/esp_netif_linux/include/esp_netif.h +++ b/components/esp_modem/port/linux/esp_netif_linux/include/esp_netif.h @@ -11,8 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef _HOST_ESP_NETIF_H_ -#define _HOST_ESP_NETIF_H_ +#pragma once #include #include @@ -63,5 +62,3 @@ void esp_netif_destroy(esp_netif_t *esp_netif); #ifdef __cplusplus } #endif - -#endif // _HOST_ESP_NETIF_H_ diff --git a/components/esp_modem/port/linux/esp_netif_linux/include/esp_netif_ip_addr.h b/components/esp_modem/port/linux/esp_netif_linux/include/esp_netif_ip_addr.h index bc0d25761..72b9d51a8 100644 --- a/components/esp_modem/port/linux/esp_netif_linux/include/esp_netif_ip_addr.h +++ b/components/esp_modem/port/linux/esp_netif_linux/include/esp_netif_ip_addr.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef _ESP_NETIF_IP_ADDR_H_ -#define _ESP_NETIF_IP_ADDR_H_ +#pragma once #include @@ -164,5 +163,3 @@ esp_ip6_addr_type_t esp_netif_ip6_get_addr_type(esp_ip6_addr_t* ip6_addr); #ifdef __cplusplus } #endif - -#endif //_ESP_NETIF_IP_ADDR_H_ diff --git a/components/esp_modem/port/linux/esp_netif_linux/include/esp_netif_ppp.h b/components/esp_modem/port/linux/esp_netif_linux/include/esp_netif_ppp.h index 4a1b5ae6d..a8c15070f 100644 --- a/components/esp_modem/port/linux/esp_netif_linux/include/esp_netif_ppp.h +++ b/components/esp_modem/port/linux/esp_netif_linux/include/esp_netif_ppp.h @@ -13,10 +13,6 @@ // limitations under the License. -#ifndef _ESP_NETIF_PPP_H_ -#define _ESP_NETIF_PPP_H_ +#pragma once #define NETIF_PP_PHASE_OFFSET 0x100 - - -#endif //_ESP_NETIF_PPP_H_ diff --git a/components/esp_modem/port/linux/esp_system_protocols_linux/include/esp_err.h b/components/esp_modem/port/linux/esp_system_protocols_linux/include/esp_err.h index 07161851d..b51321624 100644 --- a/components/esp_modem/port/linux/esp_system_protocols_linux/include/esp_err.h +++ b/components/esp_modem/port/linux/esp_system_protocols_linux/include/esp_err.h @@ -11,6 +11,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#pragma once + typedef int esp_err_t; #define ESP_FAIL -1 diff --git a/components/esp_modem/port/linux/esp_system_protocols_linux/include/esp_log.h b/components/esp_modem/port/linux/esp_system_protocols_linux/include/esp_log.h index 0898984fb..84e3700b1 100644 --- a/components/esp_modem/port/linux/esp_system_protocols_linux/include/esp_log.h +++ b/components/esp_modem/port/linux/esp_system_protocols_linux/include/esp_log.h @@ -11,8 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef MDNS_HOST_ESP_LOG_H -#define MDNS_HOST_ESP_LOG_H +#pragma once #include @@ -46,4 +45,3 @@ printf(LOG_COLOR_D); printf("(%s) ", TAG); printf(__VA_ARGS__); printf(LOG_RESET #define ESP_LOGV(TAG, ...) do { \ printf(LOG_COLOR_V); printf("(%s) ", TAG); printf(__VA_ARGS__); printf(LOG_RESET_COLOR "\n"); } while(0) -#endif //MDNS_HOST_ESP_LOG_H diff --git a/components/esp_modem/port/linux/esp_system_protocols_linux/include/machine/endian.h b/components/esp_modem/port/linux/esp_system_protocols_linux/include/machine/endian.h index 211493e28..d51201596 100644 --- a/components/esp_modem/port/linux/esp_system_protocols_linux/include/machine/endian.h +++ b/components/esp_modem/port/linux/esp_system_protocols_linux/include/machine/endian.h @@ -11,9 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef MDNS_HOST_ENDIAN_H -#define MDNS_HOST_ENDIAN_H +#pragma once #include_next "endian.h" -#endif //MDNS_HOST_ENDIAN_H diff --git a/components/esp_modem/private_include/exception_stub.hpp b/components/esp_modem/private_include/exception_stub.hpp index 5598acc01..d3f1378d3 100644 --- a/components/esp_modem/private_include/exception_stub.hpp +++ b/components/esp_modem/private_include/exception_stub.hpp @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef _EXCEPTION_STUB_HPP_ -#define _EXCEPTION_STUB_HPP_ +#pragma once #ifdef CONFIG_COMPILER_CXX_EXCEPTIONS #define TRY_CATCH_OR_DO(block, action) \ @@ -38,6 +37,3 @@ block #endif - - -#endif // _EXCEPTION_STUB_HPP_ diff --git a/components/esp_modem/private_include/uart_compat.h b/components/esp_modem/private_include/uart_compat.h index 30ee65ed7..28ae09579 100644 --- a/components/esp_modem/private_include/uart_compat.h +++ b/components/esp_modem/private_include/uart_compat.h @@ -12,12 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +#pragma once + #include "esp_log.h" #include "driver/uart.h" -#ifndef _UART_COMPAT_H_ -#define _UART_COMPAT_H_ - /** * @brief This is a compatible header, which just takes care of different data ptr type * across different IDF version in driver/uart @@ -31,5 +30,3 @@ static inline int uart_write_bytes_compat(uart_port_t uart_num, const void* src, #endif return uart_write_bytes(uart_num, data, size); } - -#endif //_UART_COMPAT_H_ diff --git a/components/esp_modem/private_include/uart_resource.hpp b/components/esp_modem/private_include/uart_resource.hpp index 3fd786d85..7daf286df 100644 --- a/components/esp_modem/private_include/uart_resource.hpp +++ b/components/esp_modem/private_include/uart_resource.hpp @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef _UART_RESOURCE_HPP_ -#define _UART_RESOURCE_HPP_ +#pragma once #include "cxx_include/esp_modem_dte.hpp" #include "esp_modem_config.h" @@ -35,5 +34,3 @@ struct uart_resource { } // namespace esp_modem - -#endif // _UART_RESOURCE_HPP_ diff --git a/components/esp_modem/private_include/uart_terminal.hpp b/components/esp_modem/private_include/uart_terminal.hpp index b647188e3..45478b071 100644 --- a/components/esp_modem/private_include/uart_terminal.hpp +++ b/components/esp_modem/private_include/uart_terminal.hpp @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef _UART_TERMINAL_HPP_ -#define _UART_TERMINAL_HPP_ +#pragma once #include "cxx_include/esp_modem_dte.hpp" @@ -25,4 +24,3 @@ std::unique_ptr create_uart_terminal(const esp_modem_dte_config *confi } // namespace esp_modem -#endif // _UART_TERMINAL_HPP_ diff --git a/components/esp_modem/private_include/vfs_termial.hpp b/components/esp_modem/private_include/vfs_termial.hpp index 85d30bf77..445907bfb 100644 --- a/components/esp_modem/private_include/vfs_termial.hpp +++ b/components/esp_modem/private_include/vfs_termial.hpp @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef _VFS_TERMINAL_HPP_ -#define _VFS_TERMINAL_HPP_ +#pragma once #include "cxx_include/esp_modem_dte.hpp" @@ -24,5 +23,3 @@ namespace esp_modem { std::unique_ptr create_vfs_terminal(const esp_modem_dte_config *config); } // namespace esp_modem - -#endif // _VFS_TERMINAL_HPP_ diff --git a/components/esp_modem/test/host_test/main/LoopbackTerm.h b/components/esp_modem/test/host_test/main/LoopbackTerm.h index 619f2ea2e..d7778dcfe 100644 --- a/components/esp_modem/test/host_test/main/LoopbackTerm.h +++ b/components/esp_modem/test/host_test/main/LoopbackTerm.h @@ -1,5 +1,4 @@ -#ifndef _LOOPBACKTERM_H_ -#define _LOOPBACKTERM_H_ +#pragma once #include "cxx_include/esp_modem_api.hpp" #include "cxx_include/esp_modem_terminal.hpp" @@ -32,5 +31,3 @@ private: bool pin_ok; bool is_bg96; }; - -#endif //_LOOPBACKTERM_H_