9 #ifndef __ewf_adapter_espressif_esp8285__h__included__
10 #define __ewf_adapter_espressif_esp8285__h__included__
27 #define EWF_ADAPTER_ESPRESSIF_ESP8285_TLS_BASIC_ENABLED (0)
28 #define EWF_ADAPTER_ESPRESSIF_ESP8285_MQTT_BASIC_ENABLED (0)
30 #if !defined(EWF_ADAPTER_ESPRESSIF_ESP8285_TLS_ENABLED) && !defined(EWF_ADAPTER_ESPRESSIF_ESP8285_TLS_BASIC_ENABLED)
32 #define EWF_ADAPTER_ESPRESSIF_ESP8285_TLS_BASIC_ENABLED (1)
33 #define EWF_ADAPTER_ESPRESSIF_ESP8285_TLS_ENABLED (0)
35 #define EWF_ADAPTER_ESPRESSIF_ESP8285_TLS_BASIC_ENABLED (0)
36 #define EWF_ADAPTER_ESPRESSIF_ESP8285_TLS_ENABLED (1)
40 #ifndef EWF_ADAPTER_ESPRESSIF_ESP8285_TCP_ENABLED
41 #define EWF_ADAPTER_ESPRESSIF_ESP8285_TCP_ENABLED (1)
44 #ifndef EWF_ADAPTER_ESPRESSIF_ESP8285_UDP_ENABLED
45 #define EWF_ADAPTER_ESPRESSIF_ESP8285_UDP_ENABLED (1)
48 #if !defined(EWF_ADAPTER_ESPRESSIF_ESP8285_MQTT_ENABLED) && !defined(EWF_ADAPTER_ESPRESSIF_ESP8285_MQTT_BASIC_ENABLED)
50 #define EWF_ADAPTER_ESPRESSIF_ESP8285_MQTT_BASIC_ENABLED (1)
51 #define EWF_ADAPTER_ESPRESSIF_ESP8285_MQTT_ENABLED (0)
53 #define EWF_ADAPTER_ESPRESSIF_ESP8285_MQTT_BASIC_ENABLED (0)
54 #define EWF_ADAPTER_ESPRESSIF_ESP8285_MQTT_ENABLED (1)
90 ewf_result ewf_adapter_espressif_esp8285_urc_callback(
ewf_interface* interface_ptr, uint8_t* buffer_ptr, uint32_t buffer_length);
101 #define ewf_adapter_espressif_esp8285_info ewf_adapter_espressif_common_info
102 #define ewf_adapter_espressif_esp8285_get_ipv4_address ewf_adapter_espressif_common_get_ipv4_address
103 #define ewf_adapter_espressif_esp8285_get_ipv4_netmask ewf_adapter_espressif_common_get_ipv4_netmask
104 #define ewf_adapter_espressif_esp8285_get_ipv4_gateway ewf_adapter_espressif_common_get_ipv4_gateway
105 #define ewf_adapter_espressif_esp8285_get_ipv4_dns ewf_adapter_espressif_common_get_ipv4_dns
115 #define ewf_adapter_espressif_esp8285_wifi_station_connect ewf_adapter_espressif_common_wifi_station_connect
116 #define ewf_adapter_espressif_esp8285_wifi_station_disconnect ewf_adapter_espressif_common_wifi_station_disconnect
126 #define ewf_adapter_espressif_esp8285_internet_start ewf_adapter_espressif_common_internet_start
127 #define ewf_adapter_espressif_esp8285_internet_stop ewf_adapter_espressif_common_internet_stop
129 #define ewf_adapter_espressif_esp8285_internet_urc_callback ewf_adapter_espressif_common_internet_urc_callback
139 #if EWF_ADAPTER_ESPRESSIF_ESP8285_TCP_ENABLED
141 #define ewf_adapter_espressif_esp8285_tcp_open ewf_adapter_espressif_common_tcp_open
142 #define ewf_adapter_espressif_esp8285_tcp_close ewf_adapter_espressif_common_tcp_close
143 #define ewf_adapter_espressif_esp8285_tcp_control ewf_adapter_espressif_common_tcp_control
144 #define ewf_adapter_espressif_esp8285_tcp_set_tls_configuration ewf_adapter_espressif_common_tcp_set_tls_configuration
145 #define ewf_adapter_espressif_esp8285_tcp_bind ewf_adapter_espressif_common_tcp_bind
146 #define ewf_adapter_espressif_esp8285_tcp_listen ewf_adapter_espressif_common_tcp_listen
147 #define ewf_adapter_espressif_esp8285_tcp_accept ewf_adapter_espressif_common_tcp_accept
148 #define ewf_adapter_espressif_esp8285_tcp_connect ewf_adapter_espressif_common_tcp_connect
149 #define ewf_adapter_espressif_esp8285_tcp_shutdown ewf_adapter_espressif_common_tcp_shutdown
150 #define ewf_adapter_espressif_esp8285_tcp_send ewf_adapter_espressif_common_tcp_send
151 #define ewf_adapter_espressif_esp8285_tcp_receive ewf_adapter_espressif_common_tcp_receive
163 #if EWF_ADAPTER_ESPRESSIF_ESP8285_UDP_ENABLED
165 #define ewf_adapter_espressif_esp8285_udp_open ewf_adapter_espressif_common_udp_open
166 #define ewf_adapter_espressif_esp8285_udp_close ewf_adapter_espressif_common_udp_close
167 #define ewf_adapter_espressif_esp8285_udp_control ewf_adapter_espressif_common_udp_control
168 #define ewf_adapter_espressif_esp8285_udp_set_dtls_configuration ewf_adapter_espressif_common_udp_set_dtls_configuration
169 #define ewf_adapter_espressif_esp8285_udp_bind ewf_adapter_espressif_common_udp_bind
170 #define ewf_adapter_espressif_esp8285_udp_send_to ewf_adapter_espressif_common_udp_send_to
171 #define ewf_adapter_espressif_esp8285_udp_receive_from ewf_adapter_espressif_common_udp_receive_from
205 #ifdef EWF_PARAMETER_CHECKING
206 #define EWF_ADAPTER_ESPRESSIF_ESP8285_INITIALIZE_HEADER(adapter_ptr) \
208 (adapter_ptr)->struct_magic = EWF_ADAPTER_STRUCT_MAGIC; \
209 (adapter_ptr)->struct_size = EWF_ADAPTER_STRUCT_SIZE; \
210 (adapter_ptr)->struct_version = EWF_ADAPTER_VERSION; \
211 (adapter_ptr)->struct_type = EWF_ADAPTER_TYPE_ESPRESSIF_ESP8285; \
214 #define EWF_ADAPTER_ESPRESSIF_ESP8285_INITIALIZE_HEADER(adapter_ptr)
217 #if EWF_ADAPTER_ESPRESSIF_ESP8285_TCP_ENABLED
218 #define EWF_ADAPTER_ESPRESSIF_ESP8285_INITIALIZE_TCP_API(adapter_ptr) \
220 adapter_ptr->tcp_api_ptr = &ewf_adapter_espressif_common_api_tcp; \
223 #define EWF_ADAPTER_ESPRESSIF_ESP8285_INITIALIZE_TCP_API(adapter_ptr)
226 #if EWF_ADAPTER_ESPRESSIF_ESP8285_UDP_ENABLED
227 #define EWF_ADAPTER_ESPRESSIF_ESP8285_INITIALIZE_UDP_API(adapter_ptr) \
229 adapter_ptr->udp_api_ptr = &ewf_adapter_espressif_common_api_udp; \
232 #define EWF_ADAPTER_ESPRESSIF_ESP8285_INITIALIZE_UDP_API(adapter_ptr)
235 #if EWF_ADAPTER_ESPRESSIF_ESP8285_TLS_BASIC_ENABLED
236 #define EWF_ADAPTER_ESPRESSIF_ESP8285_INITIALIZE_TLS_BASIC_API(adapter_ptr) \
238 adapter_ptr->tls_basic_api_ptr = &ewf_adapter_espressif_common_api_tls_basic; \
241 #define EWF_ADAPTER_ESPRESSIF_ESP8285_INITIALIZE_TLS_BASIC_API(adapter_ptr)
244 #if EWF_ADAPTER_ESPRESSIF_ESP8285_MQTT_BASIC_ENABLED
245 #define EWF_ADAPTER_ESPRESSIF_ESP8285_INITIALIZE_MQTT_BASIC_API(adapter_ptr) \
247 adapter_ptr->mqtt_basic_api_ptr = &ewf_adapter_espressif_common_api_mqtt_basic; \
250 #define EWF_ADAPTER_ESPRESSIF_ESP8285_INITIALIZE_MQTT_BASIC_API(adapter_ptr)
261 #define EWF_ADAPTER_ESPRESSIF_ESP8285_STATIC_DECLARE(adapter_ptr, adapter_name_symb, message_allocator_ptr_param, data_allocator_ptr_param, interface_ptr_param) \
263 static ewf_adapter_espressif_esp8285 ewf_adapter_espressif_esp8285__implementation__##adapter_name_symb = {0}; \
264 static ewf_adapter ewf_adapter_espressif_esp8285__##adapter_name_symb = {0}; \
265 interface_ptr_param->message_allocator_ptr = message_allocator_ptr_param; \
266 interface_ptr_param->data_allocator_ptr = data_allocator_ptr_param; \
267 interface_ptr_param->urc_callback = ewf_adapter_espressif_esp8285_urc_callback; \
268 ewf_adapter_espressif_esp8285__##adapter_name_symb.interface_ptr = interface_ptr_param; \
269 ewf_adapter_espressif_esp8285__##adapter_name_symb.implementation_ptr = &(ewf_adapter_espressif_esp8285__implementation__##adapter_name_symb); \
270 adapter_ptr = &(ewf_adapter_espressif_esp8285__##adapter_name_symb); \
271 interface_ptr_param->adapter_ptr = adapter_ptr; \
272 EWF_ADAPTER_ESPRESSIF_ESP8285_INITIALIZE_HEADER(adapter_ptr); \
273 ewf_adapter_espressif_esp8285__##adapter_name_symb.control_api_ptr = &ewf_adapter_espressif_esp8285_api_control; \
274 ewf_adapter_espressif_esp8285__##adapter_name_symb.wifi_station_api_ptr = &ewf_adapter_espressif_common_api_wifi_station; \
275 ewf_adapter_espressif_esp8285__##adapter_name_symb.info_api_ptr = &ewf_adapter_espressif_common_api_info; \
276 EWF_ADAPTER_ESPRESSIF_ESP8285_INITIALIZE_TCP_API(adapter_ptr); \
277 EWF_ADAPTER_ESPRESSIF_ESP8285_INITIALIZE_UDP_API(adapter_ptr); \
278 EWF_ADAPTER_ESPRESSIF_ESP8285_INITIALIZE_TLS_BASIC_API(adapter_ptr); \
279 EWF_ADAPTER_ESPRESSIF_ESP8285_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_esp8285 ewf_adapter_espressif_esp8285
The ESPRESSIF 8285 adapter driver 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 8285 adapter driver data structure.
Definition: ewf_adapter_espressif_esp8285.h:191
ewf_adapter_espressif_common common_implementation_data
Definition: ewf_adapter_espressif_esp8285.h:193
The EWF network adapter control structure definition.
Definition: ewf_adapter.h:50
The interface structure definition.
Definition: ewf_interface.h:66