11 #ifndef __ewf_interface_microchip_pic_uart__h__included__
12 #define __ewf_interface_microchip_pic_uart__h__included__
35 #ifndef EWF_INTERFACE_MICROCHIP_PIC_UART_CONFIG_RESPONSE_QUEUE_SIZE
36 #define EWF_INTERFACE_MICROCHIP_PIC_UART_CONFIG_RESPONSE_QUEUE_SIZE (8)
39 #ifndef EWF_INTERFACE_MICROCHIP_PIC_UART_CONFIG_URC_QUEUE_SIZE
40 #define EWF_INTERFACE_MICROCHIP_PIC_UART_CONFIG_URC_QUEUE_SIZE (8)
48 uint8_t rx_buffer[
sizeof(uint8_t)];
74 #ifdef EWF_PARAMETER_CHECKING
75 #define EWF_INTERFACE_MICROCHIP_PIC_UART_INITIALIZE_HEADER(interface_ptr) \
77 (interface_ptr)->struct_magic = EWF_INTERFACE_STRUCT_MAGIC; \
78 (interface_ptr)->struct_size = EWF_INTERFACE_STRUCT_SIZE; \
79 (interface_ptr)->struct_version = EWF_INTERFACE_VERSION; \
80 (interface_ptr)->struct_type = EWF_INTERFACE_TYPE_MICROCHIP_PIC_UART; \
83 #define EWF_INTERFACE_MICROCHIP_PIC_UART_INITIALIZE_HEADER(interface_ptr)
91 #define EWF_INTERFACE_MICROCHIP_PIC_UART_STATIC_DECLARE(interface_ptr, interface_name_symb) \
93 static ewf_interface_microchip_pic_uart ewf_interface_microchip_pic_uart__implementation__##interface_name_symb = {0}; \
94 static ewf_interface ewf_interface_microchip_pic_uart__interface__##interface_name_symb = {0}; \
95 EWF_PLATFORM_QUEUE_STATIC_DECLARE( \
96 ewf_interface_microchip_pic_uart__interface__##interface_name_symb.response_queue_ptr, \
97 ewf_interface_microchip_pic_uart__response_queue__##interface_name_symb, \
98 ewf_interface_message, \
99 EWF_INTERFACE_MICROCHIP_PIC_UART_CONFIG_RESPONSE_QUEUE_SIZE); \
100 EWF_PLATFORM_QUEUE_STATIC_DECLARE( \
101 ewf_interface_microchip_pic_uart__interface__##interface_name_symb.urc_queue_ptr, \
102 ewf_interface_microchip_pic_uart__urc_queue__##interface_name_symb, \
103 ewf_interface_message, \
104 EWF_INTERFACE_MICROCHIP_PIC_UART_CONFIG_URC_QUEUE_SIZE); \
105 ewf_interface_microchip_pic_uart__interface__##interface_name_symb.hardware_start = ewf_interface_microchip_pic_uart_hardware_start; \
106 ewf_interface_microchip_pic_uart__interface__##interface_name_symb.hardware_stop = ewf_interface_microchip_pic_uart_hardware_stop; \
107 ewf_interface_microchip_pic_uart__interface__##interface_name_symb.hardware_send = ewf_interface_microchip_pic_uart_hardware_send; \
108 ewf_interface_microchip_pic_uart__interface__##interface_name_symb.hardware_receive = ewf_interface_microchip_pic_uart_hardware_receive; \
109 ewf_interface_microchip_pic_uart__interface__##interface_name_symb.implementation_ptr = &(ewf_interface_microchip_pic_uart__implementation__##interface_name_symb); \
110 interface_ptr = &(ewf_interface_microchip_pic_uart__interface__##interface_name_symb); \
111 EWF_INTERFACE_MICROCHIP_PIC_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.
struct _ewf_interface_microchip_pic_uart ewf_interface_microchip_pic_uart
the PIC UART interface implementation data structure type
ewf_result ewf_interface_microchip_pic_uart_hardware_send(ewf_interface *interface_ptr, const uint8_t *buffer_ptr, uint32_t buffer_length)
Send a buffer using the RX UART hardware interface.
Definition: ewf_interface_microchip_pic_uart.c:38
ewf_result ewf_interface_microchip_pic_uart_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.
Definition: ewf_interface_microchip_pic_uart.c:75
ewf_result ewf_interface_microchip_pic_uart_hardware_start(ewf_interface *interface_ptr)
Start the PIC UART hardware interface.
Definition: ewf_interface_microchip_pic_uart.c:19
ewf_result ewf_interface_microchip_pic_uart_hardware_stop(ewf_interface *interface_ptr)
Stop the PIC UART hardware interface.
Definition: ewf_interface_microchip_pic_uart.c:29
the PIC UART interface implementation data structure type
Definition: ewf_interface_microchip_pic_uart.h:47
The interface structure definition.
Definition: ewf_interface.h:66