11 #ifndef __ewf_interface_microchip_sam_uart__h__included__
12 #define __ewf_interface_microchip_sam_uart__h__included__
35 #ifndef EWF_INTERFACE_MICROCHIP_SAM_UART_CONFIG_RESPONSE_QUEUE_SIZE
36 #define EWF_INTERFACE_MICROCHIP_SAM_UART_CONFIG_RESPONSE_QUEUE_SIZE (8)
39 #ifndef EWF_INTERFACE_MICROCHIP_SAM_UART_CONFIG_URC_QUEUE_SIZE
40 #define EWF_INTERFACE_MICROCHIP_SAM_UART_CONFIG_URC_QUEUE_SIZE (8)
48 uint8_t rx_buffer[
sizeof(uint8_t)];
73 #ifdef EWF_PARAMETER_CHECKING
74 #define EWF_INTERFACE_MICROCHIP_SAM_UART_INITIALIZE_HEADER(global_interface_ptr) \
76 (global_interface_ptr)->struct_magic = EWF_INTERFACE_STRUCT_MAGIC; \
77 (global_interface_ptr)->struct_size = EWF_INTERFACE_STRUCT_SIZE; \
78 (global_interface_ptr)->struct_version = EWF_INTERFACE_VERSION; \
79 (global_interface_ptr)->struct_type = EWF_INTERFACE_TYPE_MICROCHIP_SAM_UART; \
82 #define EWF_INTERFACE_MICROCHIP_SAM_UART_INITIALIZE_HEADER(interface_ptr)
90 #define EWF_INTERFACE_MICROCHIP_SAM_UART_STATIC_DECLARE(interface_ptr, interface_name_symb) \
92 static ewf_interface_microchip_sam_uart ewf_interface_microchip_sam_uart__implementation__##interface_name_symb = {0}; \
93 static ewf_interface ewf_interface_microchip_sam_uart__interface__##interface_name_symb = {0}; \
94 EWF_PLATFORM_QUEUE_STATIC_DECLARE( \
95 ewf_interface_microchip_sam_uart__interface__##interface_name_symb.response_queue_ptr, \
96 ewf_interface_microchip_sam_uart__response_queue__##interface_name_symb, \
97 ewf_interface_message, \
98 EWF_INTERFACE_MICROCHIP_SAM_UART_CONFIG_RESPONSE_QUEUE_SIZE); \
99 EWF_PLATFORM_QUEUE_STATIC_DECLARE( \
100 ewf_interface_microchip_sam_uart__interface__##interface_name_symb.urc_queue_ptr, \
101 ewf_interface_microchip_sam_uart__urc_queue__##interface_name_symb, \
102 ewf_interface_message, \
103 EWF_INTERFACE_MICROCHIP_SAM_UART_CONFIG_URC_QUEUE_SIZE); \
104 ewf_interface_microchip_sam_uart__interface__##interface_name_symb.hardware_start = ewf_interface_microchip_sam_uart_hardware_start; \
105 ewf_interface_microchip_sam_uart__interface__##interface_name_symb.hardware_stop = ewf_interface_microchip_sam_uart_hardware_stop; \
106 ewf_interface_microchip_sam_uart__interface__##interface_name_symb.hardware_send = ewf_interface_microchip_sam_uart_hardware_send; \
107 ewf_interface_microchip_sam_uart__interface__##interface_name_symb.hardware_receive = ewf_interface_microchip_sam_uart_hardware_receive; \
108 ewf_interface_microchip_sam_uart__interface__##interface_name_symb.implementation_ptr = &(ewf_interface_microchip_sam_uart__implementation__##interface_name_symb); \
109 interface_ptr = &(ewf_interface_microchip_sam_uart__interface__##interface_name_symb); \
110 EWF_INTERFACE_MICROCHIP_SAM_UART_INITIALIZE_HEADER(interface_ptr); \
The Embedded Wireless Framework host interface API.
enum _ewf_result ewf_result
Success and error result codes specific to the EWF API.
ewf_result ewf_interface_microchip_sam_hardware_send(ewf_interface *interface_ptr, const uint8_t *buffer_ptr, uint32_t buffer_length)
Send a buffer using the RX UART hardware interface.
ewf_result ewf_interface_microchip_sam_uart_hardware_start(ewf_interface *interface_ptr)
Start the SAM UART hardware interface.
Definition: ewf_interface_microchip_sam_uart.c:24
ewf_result ewf_interface_microchip_sam_hardware_receive(ewf_interface *interface_ptr, uint8_t *buffer_ptr, uint32_t *buffer_length_ptr, bool wait)
Receive a buffer using the RX UART hardware interface.
struct _ewf_interface_microchip_sam_uart ewf_interface_microchip_sam_uart
the SAM UART interface implementation data structure type
ewf_result ewf_interface_microchip_sam_uart_hardware_stop(ewf_interface *interface_ptr)
Stop the SAM UART hardware interface.
Definition: ewf_interface_microchip_sam_uart.c:36
the SAM UART interface implementation data structure type
Definition: ewf_interface_microchip_sam_uart.h:47
The interface structure definition.
Definition: ewf_interface.h:66