9 #ifndef __ewf_adapter_espressif_wroom_02__h__included__
10 #define __ewf_adapter_espressif_wroom_02__h__included__
27 #define EWF_ADAPTER_ESPRESSIF_WROOM_02_TLS_BASIC_ENABLED (0)
28 #define EWF_ADAPTER_ESPRESSIF_WROOM_02_MQTT_BASIC_ENABLED (0)
30 #if !defined(EWF_ADAPTER_ESPRESSIF_WROOM_02_TLS_ENABLED) && !defined(EWF_ADAPTER_ESPRESSIF_WROOM_02_TLS_BASIC_ENABLED)
32 #define EWF_ADAPTER_ESPRESSIF_WROOM_02_TLS_BASIC_ENABLED (1)
33 #define EWF_ADAPTER_ESPRESSIF_WROOM_02_TLS_ENABLED (0)
35 #define EWF_ADAPTER_ESPRESSIF_WROOM_02_TLS_BASIC_ENABLED (0)
36 #define EWF_ADAPTER_ESPRESSIF_WROOM_02_TLS_ENABLED (1)
40 #ifndef EWF_ADAPTER_ESPRESSIF_WROOM_02_TCP_ENABLED
41 #define EWF_ADAPTER_ESPRESSIF_WROOM_02_TCP_ENABLED (1)
44 #ifndef EWF_ADAPTER_ESPRESSIF_WROOM_02_UDP_ENABLED
45 #define EWF_ADAPTER_ESPRESSIF_WROOM_02_UDP_ENABLED (1)
48 #if !defined(EWF_ADAPTER_ESPRESSIF_WROOM_02_MQTT_ENABLED) && !defined(EWF_ADAPTER_ESPRESSIF_WROOM_02_MQTT_BASIC_ENABLED)
50 #define EWF_ADAPTER_ESPRESSIF_WROOM_02_MQTT_BASIC_ENABLED (1)
51 #define EWF_ADAPTER_ESPRESSIF_WROOM_02_MQTT_ENABLED (0)
53 #define EWF_ADAPTER_ESPRESSIF_WROOM_02_MQTT_BASIC_ENABLED (0)
54 #define EWF_ADAPTER_ESPRESSIF_WROOM_02_MQTT_ENABLED (1)
90 ewf_result ewf_adapter_espressif_wroom_02_urc_callback(
ewf_interface* interface_ptr, uint8_t* buffer_ptr, uint32_t buffer_length);
100 #define ewf_adapter_espressif_wroom_02_info ewf_adapter_espressif_common_info
101 #define ewf_adapter_espressif_wroom_02_get_ipv4_address ewf_adapter_espressif_common_get_ipv4_address
102 #define ewf_adapter_espressif_wroom_02_get_ipv4_netmask ewf_adapter_espressif_common_get_ipv4_netmask
103 #define ewf_adapter_espressif_wroom_02_get_ipv4_gateway ewf_adapter_espressif_common_get_ipv4_gateway
104 #define ewf_adapter_espressif_wroom_02_get_ipv4_dns ewf_adapter_espressif_common_get_ipv4_dns
114 #define ewf_adapter_espressif_wroom_02_wifi_station_connect ewf_adapter_espressif_common_wifi_station_connect
115 #define ewf_adapter_espressif_wroom_02_wifi_station_disconnect ewf_adapter_espressif_common_wifi_station_disconnect
125 #define ewf_adapter_espressif_wroom_02_internet_start ewf_adapter_espressif_common_internet_start
126 #define ewf_adapter_espressif_wroom_02_internet_stop ewf_adapter_espressif_common_internet_stop
128 #define ewf_adapter_espressif_wroom_02_internet_urc_callback ewf_adapter_espressif_common_internet_urc_callback
138 #if EWF_ADAPTER_ESPRESSIF_WROOM_02_TCP_ENABLED
140 #define ewf_adapter_espressif_wroom_02_tcp_open ewf_adapter_espressif_common_tcp_open
141 #define ewf_adapter_espressif_wroom_02_tcp_close ewf_adapter_espressif_common_tcp_close
142 #define ewf_adapter_espressif_wroom_02_tcp_control ewf_adapter_espressif_common_tcp_control
143 #define ewf_adapter_espressif_wroom_02_tcp_set_tls_configuration ewf_adapter_espressif_common_tcp_set_tls_configuration
144 #define ewf_adapter_espressif_wroom_02_tcp_bind ewf_adapter_espressif_common_tcp_bind
145 #define ewf_adapter_espressif_wroom_02_tcp_listen ewf_adapter_espressif_common_tcp_listen
146 #define ewf_adapter_espressif_wroom_02_tcp_accept ewf_adapter_espressif_common_tcp_accept
147 #define ewf_adapter_espressif_wroom_02_tcp_connect ewf_adapter_espressif_common_tcp_connect
148 #define ewf_adapter_espressif_wroom_02_tcp_shutdown ewf_adapter_espressif_common_tcp_shutdown
149 #define ewf_adapter_espressif_wroom_02_tcp_send ewf_adapter_espressif_common_tcp_send
150 #define ewf_adapter_espressif_wroom_02_tcp_receive ewf_adapter_espressif_common_tcp_receive
162 #if EWF_ADAPTER_ESPRESSIF_WROOM_02_UDP_ENABLED
164 #define ewf_adapter_espressif_wroom_02_udp_open ewf_adapter_espressif_common_udp_open
165 #define ewf_adapter_espressif_wroom_02_udp_close ewf_adapter_espressif_common_udp_close
166 #define ewf_adapter_espressif_wroom_02_udp_control ewf_adapter_espressif_common_udp_control
167 #define ewf_adapter_espressif_wroom_02_udp_set_dtls_configuration ewf_adapter_espressif_common_udp_set_dtls_configuration
168 #define ewf_adapter_espressif_wroom_02_udp_bind ewf_adapter_espressif_common_udp_bind
169 #define ewf_adapter_espressif_wroom_02_udp_send_to ewf_adapter_espressif_common_udp_send_to
170 #define ewf_adapter_espressif_wroom_02_udp_receive_from ewf_adapter_espressif_common_udp_receive_from
204 #ifdef EWF_PARAMETER_CHECKING
205 #define EWF_ADAPTER_ESPRESSIF_WROOM_02_INITIALIZE_HEADER(adapter_ptr) \
207 (adapter_ptr)->struct_magic = EWF_ADAPTER_STRUCT_MAGIC; \
208 (adapter_ptr)->struct_size = EWF_ADAPTER_STRUCT_SIZE; \
209 (adapter_ptr)->struct_version = EWF_ADAPTER_VERSION; \
210 (adapter_ptr)->struct_type = EWF_ADAPTER_TYPE_ESPRESSIF_WROOM_02; \
213 #define EWF_ADAPTER_ESPRESSIF_WROOM_02_INITIALIZE_HEADER(adapter_ptr)
216 #if EWF_ADAPTER_ESPRESSIF_WROOM_02_TCP_ENABLED
217 #define EWF_ADAPTER_ESPRESSIF_WROOM_02_INITIALIZE_TCP_API(adapter_ptr) \
219 adapter_ptr->tcp_api_ptr = &ewf_adapter_espressif_common_api_tcp; \
222 #define EWF_ADAPTER_ESPRESSIF_WROOM_02_INITIALIZE_TCP_API(adapter_ptr)
225 #if EWF_ADAPTER_ESPRESSIF_WROOM_02_UDP_ENABLED
226 #define EWF_ADAPTER_ESPRESSIF_WROOM_02_INITIALIZE_UDP_API(adapter_ptr) \
228 adapter_ptr->udp_api_ptr = &ewf_adapter_espressif_common_api_udp; \
231 #define EWF_ADAPTER_ESPRESSIF_WROOM_02_INITIALIZE_UDP_API(adapter_ptr)
234 #if EWF_ADAPTER_ESPRESSIF_WROOM_02_TLS_BASIC_ENABLED
235 #define EWF_ADAPTER_ESPRESSIF_WROOM_02_INITIALIZE_TLS_BASIC_API(adapter_ptr) \
237 adapter_ptr->tls_basic_api_ptr = &ewf_adapter_espressif_common_api_tls_basic; \
240 #define EWF_ADAPTER_ESPRESSIF_WROOM_02_INITIALIZE_TLS_BASIC_API(adapter_ptr)
243 #if EWF_ADAPTER_ESPRESSIF_WROOM_02_MQTT_BASIC_ENABLED
244 #define EWF_ADAPTER_ESPRESSIF_WROOM_02_INITIALIZE_MQTT_BASIC_API(adapter_ptr) \
246 adapter_ptr->mqtt_basic_api_ptr = &ewf_adapter_espressif_common_api_mqtt_basic; \
249 #define EWF_ADAPTER_ESPRESSIF_WROOM_02_INITIALIZE_MQTT_BASIC_API(adapter_ptr)
260 #define EWF_ADAPTER_ESPRESSIF_WROOM_02_STATIC_DECLARE(adapter_ptr, adapter_name_symb, message_allocator_ptr_param, data_allocator_ptr_param, interface_ptr_param) \
262 static ewf_adapter_espressif_wroom_02 ewf_adapter_espressif_wroom_02__implementation__##adapter_name_symb = {0}; \
263 static ewf_adapter ewf_adapter_espressif_wroom_02__##adapter_name_symb = {0}; \
264 interface_ptr_param->message_allocator_ptr = message_allocator_ptr_param; \
265 interface_ptr_param->data_allocator_ptr = data_allocator_ptr_param; \
266 interface_ptr_param->urc_callback = ewf_adapter_espressif_wroom_02_urc_callback; \
267 ewf_adapter_espressif_wroom_02__##adapter_name_symb.interface_ptr = interface_ptr_param; \
268 ewf_adapter_espressif_wroom_02__##adapter_name_symb.implementation_ptr = &(ewf_adapter_espressif_wroom_02__implementation__##adapter_name_symb); \
269 adapter_ptr = &(ewf_adapter_espressif_wroom_02__##adapter_name_symb); \
270 interface_ptr_param->adapter_ptr = adapter_ptr; \
271 EWF_ADAPTER_ESPRESSIF_WROOM_02_INITIALIZE_HEADER(adapter_ptr); \
272 ewf_adapter_espressif_wroom_02__##adapter_name_symb.control_api_ptr = &ewf_adapter_espressif_wroom_02_api_control; \
273 ewf_adapter_espressif_wroom_02__##adapter_name_symb.wifi_station_api_ptr = &ewf_adapter_espressif_common_api_wifi_station; \
274 ewf_adapter_espressif_wroom_02__##adapter_name_symb.info_api_ptr = &ewf_adapter_espressif_common_api_info; \
275 EWF_ADAPTER_ESPRESSIF_WROOM_02_INITIALIZE_TCP_API(adapter_ptr); \
276 EWF_ADAPTER_ESPRESSIF_WROOM_02_INITIALIZE_UDP_API(adapter_ptr); \
277 EWF_ADAPTER_ESPRESSIF_WROOM_02_INITIALIZE_TLS_BASIC_API(adapter_ptr); \
278 EWF_ADAPTER_ESPRESSIF_WROOM_02_INITIALIZE_MQTT_BASIC_API(adapter_ptr); \
The Embedded Wireless Framework adapter API implementation.
The Embedded Wireless Framework Espressif common adapter API.
The Embedded Wireless Framework host interface API.
struct _ewf_adapter_espressif_wroom_02 ewf_adapter_espressif_wroom_02
The ESPRESSIF WROOM_02 adapter data structure.
enum _ewf_result ewf_result
Success and error result codes specific to the EWF API.
The adapter control API type.
Definition: ewf_adapter_api_control.h:28
The ESPRESSIF common adapter data structure.
Definition: ewf_adapter_espressif_common.h:106
The ESPRESSIF WROOM_02 adapter data structure.
Definition: ewf_adapter_espressif_wroom_02.h:190
ewf_adapter_espressif_common common_implementation_data
Definition: ewf_adapter_espressif_wroom_02.h:192
The EWF network adapter control structure definition.
Definition: ewf_adapter.h:50
The interface structure definition.
Definition: ewf_interface.h:66