9 #ifndef __ewf_adapter_mxchip_emw3080b__h__included__
10 #define __ewf_adapter_mxchip_emw3080b__h__included__
27 #define EWF_ADAPTER_MXCHIP_EMW3080B_TLS_BASIC_ENABLED (0)
28 #define EWF_ADAPTER_MXCHIP_EMW3080B_MQTT_BASIC_ENABLED (0)
30 #if !defined(EWF_ADAPTER_MXCHIP_EMW3080B_TLS_ENABLED) && !defined(EWF_ADAPTER_MXCHIP_EMW3080B_TLS_BASIC_ENABLED)
32 #define EWF_ADAPTER_MXCHIP_EMW3080B_TLS_BASIC_ENABLED (1)
33 #define EWF_ADAPTER_MXCHIP_EMW3080B_TLS_ENABLED (0)
35 #define EWF_ADAPTER_MXCHIP_EMW3080B_TLS_BASIC_ENABLED (0)
36 #define EWF_ADAPTER_MXCHIP_EMW3080B_TLS_ENABLED (1)
40 #ifndef EWF_ADAPTER_MXCHIP_EMW3080B_TCP_ENABLED
41 #define EWF_ADAPTER_MXCHIP_EMW3080B_TCP_ENABLED (1)
44 #ifndef EWF_ADAPTER_MXCHIP_EMW3080B_UDP_ENABLED
45 #define EWF_ADAPTER_MXCHIP_EMW3080B_UDP_ENABLED (1)
48 #if !defined(EWF_ADAPTER_MXCHIP_EMW3080B_MQTT_ENABLED) && !defined(EWF_ADAPTER_MXCHIP_EMW3080B_MQTT_BASIC_ENABLED)
50 #define EWF_ADAPTER_MXCHIP_EMW3080B_MQTT_BASIC_ENABLED (1)
51 #define EWF_ADAPTER_MXCHIP_EMW3080B_MQTT_ENABLED (0)
53 #define EWF_ADAPTER_MXCHIP_EMW3080B_MQTT_BASIC_ENABLED (0)
54 #define EWF_ADAPTER_MXCHIP_EMW3080B_MQTT_ENABLED (1)
90 ewf_result ewf_adapter_mxchip_emw3080b_urc_callback(
ewf_interface* interface_ptr, uint8_t* buffer_ptr, uint32_t buffer_length);
100 #define ewf_adapter_mxchip_emw3080b_info ewf_adapter_mxchip_common_info
101 #define ewf_adapter_mxchip_emw3080b_get_ipv4_address ewf_adapter_mxchip_common_get_ipv4_address
102 #define ewf_adapter_mxchip_emw3080b_get_ipv4_netmask ewf_adapter_mxchip_common_get_ipv4_netmask
103 #define ewf_adapter_mxchip_emw3080b_get_ipv4_gateway ewf_adapter_mxchip_common_get_ipv4_gateway
104 #define ewf_adapter_mxchip_emw3080b_get_ipv4_dns ewf_adapter_mxchip_common_get_ipv4_dns
114 #define ewf_adapter_mxchip_emw3080b_wifi_station_connect ewf_adapter_mxchip_common_wifi_station_connect
115 #define ewf_adapter_mxchip_emw3080b_wifi_station_disconnect ewf_adapter_mxchip_common_wifi_station_disconnect
125 #define ewf_adapter_mxchip_emw3080b_internet_start ewf_adapter_mxchip_common_internet_start
126 #define ewf_adapter_mxchip_emw3080b_internet_stop ewf_adapter_mxchip_common_internet_stop
128 #define ewf_adapter_mxchip_emw3080b_internet_urc_callback ewf_adapter_mxchip_common_internet_urc_callback
138 #if EWF_ADAPTER_MXCHIP_EMW3080B_TCP_ENABLED
140 #define ewf_adapter_mxchip_emw3080b_tcp_open ewf_adapter_mxchip_common_tcp_open
141 #define ewf_adapter_mxchip_emw3080b_tcp_close ewf_adapter_mxchip_common_tcp_close
142 #define ewf_adapter_mxchip_emw3080b_tcp_control ewf_adapter_mxchip_common_tcp_control
143 #define ewf_adapter_mxchip_emw3080b_tcp_set_tls_configuration ewf_adapter_mxchip_common_tcp_set_tls_configuration
144 #define ewf_adapter_mxchip_emw3080b_tcp_bind ewf_adapter_mxchip_common_tcp_bind
145 #define ewf_adapter_mxchip_emw3080b_tcp_listen ewf_adapter_mxchip_common_tcp_listen
146 #define ewf_adapter_mxchip_emw3080b_tcp_accept ewf_adapter_mxchip_common_tcp_accept
147 #define ewf_adapter_mxchip_emw3080b_tcp_connect ewf_adapter_mxchip_common_tcp_connect
148 #define ewf_adapter_mxchip_emw3080b_tcp_shutdown ewf_adapter_mxchip_common_tcp_shutdown
149 #define ewf_adapter_mxchip_emw3080b_tcp_send ewf_adapter_mxchip_common_tcp_send
150 #define ewf_adapter_mxchip_emw3080b_tcp_receive ewf_adapter_mxchip_common_tcp_receive
162 #if EWF_ADAPTER_MXCHIP_EMW3080B_UDP_ENABLED
164 #define ewf_adapter_mxchip_emw3080b_udp_open ewf_adapter_mxchip_common_udp_open
165 #define ewf_adapter_mxchip_emw3080b_udp_close ewf_adapter_mxchip_common_udp_close
166 #define ewf_adapter_mxchip_emw3080b_udp_control ewf_adapter_mxchip_common_udp_control
167 #define ewf_adapter_mxchip_emw3080b_udp_set_dtls_configuration ewf_adapter_mxchip_common_udp_set_dtls_configuration
168 #define ewf_adapter_mxchip_emw3080b_udp_bind ewf_adapter_mxchip_common_udp_bind
169 #define ewf_adapter_mxchip_emw3080b_udp_send_to ewf_adapter_mxchip_common_udp_send_to
170 #define ewf_adapter_mxchip_emw3080b_udp_receive_from ewf_adapter_mxchip_common_udp_receive_from
204 #ifdef EWF_PARAMETER_CHECKING
205 #define EWF_ADAPTER_MXCHIP_EMW3080B_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_MXCHIP_EMW3080B; \
213 #define EWF_ADAPTER_MXCHIP_EMW3080B_INITIALIZE_HEADER(adapter_ptr)
216 #if EWF_ADAPTER_MXCHIP_EMW3080B_TCP_ENABLED
217 #define EWF_ADAPTER_MXCHIP_EMW3080B_INITIALIZE_TCP_API(adapter_ptr) \
219 adapter_ptr->tcp_api_ptr = &ewf_adapter_mxchip_common_api_tcp; \
222 #define EWF_ADAPTER_MXCHIP_EMW3080B_INITIALIZE_TCP_API(adapter_ptr)
225 #if EWF_ADAPTER_MXCHIP_EMW3080B_UDP_ENABLED
226 #define EWF_ADAPTER_MXCHIP_EMW3080B_INITIALIZE_UDP_API(adapter_ptr) \
228 adapter_ptr->udp_api_ptr = &ewf_adapter_mxchip_common_api_udp; \
231 #define EWF_ADAPTER_MXCHIP_EMW3080B_INITIALIZE_UDP_API(adapter_ptr)
234 #if EWF_ADAPTER_MXCHIP_EMW3080B_TLS_BASIC_ENABLED
235 #define EWF_ADAPTER_MXCHIP_EMW3080B_INITIALIZE_TLS_BASIC_API(adapter_ptr) \
237 adapter_ptr->tls_basic_api_ptr = &ewf_adapter_mxchip_common_api_tls_basic; \
240 #define EWF_ADAPTER_MXCHIP_EMW3080B_INITIALIZE_TLS_BASIC_API(adapter_ptr)
243 #if EWF_ADAPTER_MXCHIP_EMW3080B_MQTT_BASIC_ENABLED
244 #define EWF_ADAPTER_MXCHIP_EMW3080B_INITIALIZE_MQTT_BASIC_API(adapter_ptr) \
246 adapter_ptr->mqtt_basic_api_ptr = &ewf_adapter_mxchip_common_api_mqtt_basic; \
249 #define EWF_ADAPTER_MXCHIP_EMW3080B_INITIALIZE_MQTT_BASIC_API(adapter_ptr)
260 #define EWF_ADAPTER_MXCHIP_EMW3080B_STATIC_DECLARE(adapter_ptr, adapter_name_symb, message_allocator_ptr_param, data_allocator_ptr_param, interface_ptr_param) \
262 static ewf_adapter_mxchip_emw3080b ewf_adapter_mxchip_emw3080b__implementation__##adapter_name_symb = {0}; \
263 static ewf_adapter ewf_adapter_mxchip_emw3080b__##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_mxchip_emw3080b_urc_callback; \
267 ewf_adapter_mxchip_emw3080b__##adapter_name_symb.interface_ptr = interface_ptr_param; \
268 ewf_adapter_mxchip_emw3080b__##adapter_name_symb.implementation_ptr = &(ewf_adapter_mxchip_emw3080b__implementation__##adapter_name_symb); \
269 adapter_ptr = &(ewf_adapter_mxchip_emw3080b__##adapter_name_symb); \
270 interface_ptr_param->adapter_ptr = adapter_ptr; \
271 EWF_ADAPTER_MXCHIP_EMW3080B_INITIALIZE_HEADER(adapter_ptr); \
272 ewf_adapter_mxchip_emw3080b__##adapter_name_symb.control_api_ptr = &ewf_adapter_mxchip_emw3080b_api_control; \
273 ewf_adapter_mxchip_emw3080b__##adapter_name_symb.wifi_station_api_ptr = &ewf_adapter_mxchip_common_api_wifi_station; \
274 ewf_adapter_mxchip_emw3080b__##adapter_name_symb.info_api_ptr = &ewf_adapter_mxchip_common_api_info; \
275 EWF_ADAPTER_MXCHIP_EMW3080B_INITIALIZE_TCP_API(adapter_ptr); \
276 EWF_ADAPTER_MXCHIP_EMW3080B_INITIALIZE_UDP_API(adapter_ptr); \
277 EWF_ADAPTER_MXCHIP_EMW3080B_INITIALIZE_TLS_BASIC_API(adapter_ptr); \
278 EWF_ADAPTER_MXCHIP_EMW3080B_INITIALIZE_MQTT_BASIC_API(adapter_ptr); \
The Embedded Wireless Framework adapter API implementation.
The Embedded Wireless Framework MX-CHIP common adapter API.
The Embedded Wireless Framework host interface API.
struct _ewf_adapter_mxchip_emw3080b ewf_adapter_mxchip_emw3080b
The MX-CHIP 8266 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 MX-CHIP common adapter data structure.
Definition: ewf_adapter_mxchip_common.h:121
The MX-CHIP 8266 adapter driver data structure.
Definition: ewf_adapter_mxchip_emw3080b.h:190
ewf_adapter_mxchip_common common_implementation_data
Definition: ewf_adapter_mxchip_emw3080b.h:192
The EWF network adapter control structure definition.
Definition: ewf_adapter.h:50
The interface structure definition.
Definition: ewf_interface.h:66