9 #ifndef __ewf_interface_ra_uart__h__included__
10 #define __ewf_interface_ra_uart__h__included__
14 #include "r_sci_uart.h"
15 #include "r_uart_api.h"
34 #ifndef EWF_INTERFACE_RA_UART_CONFIG_UART_RX_QUEUE_SIZE
35 #define EWF_INTERFACE_RA_UART_CONFIG_UART_RX_QUEUE_SIZE (2048)
38 #ifndef EWF_INTERFACE_RA_UART_CONFIG_RESPONSE_QUEUE_SIZE
39 #define EWF_INTERFACE_RA_UART_CONFIG_RESPONSE_QUEUE_SIZE (8)
42 #ifndef EWF_INTERFACE_RA_UART_CONFIG_URC_QUEUE_SIZE
43 #define EWF_INTERFACE_RA_UART_CONFIG_URC_QUEUE_SIZE (8)
53 volatile uint8_t g_uart_event;
78 #ifdef EWF_PARAMETER_CHECKING
79 #define EWF_INTERFACE_RA_UART_INITIALIZE_HEADER(interface_ptr) \
81 (interface_ptr)->struct_magic = EWF_INTERFACE_STRUCT_MAGIC; \
82 (interface_ptr)->struct_size = EWF_INTERFACE_STRUCT_SIZE; \
83 (interface_ptr)->struct_version = EWF_INTERFACE_VERSION; \
84 (interface_ptr)->struct_type = EWF_INTERFACE_TYPE_RA_UART; \
87 #define EWF_INTERFACE_RA_UART_INITIALIZE_HEADER(interface_ptr)
95 #define EWF_INTERFACE_RA_UART_STATIC_DECLARE(interface_ptr, interface_name_symb) \
97 static ewf_interface_ra_uart ewf_interface_ra_uart__implementation__##interface_name_symb = {0}; \
98 static ewf_interface ewf_interface_ra_uart__interface__##interface_name_symb = {0}; \
99 EWF_PLATFORM_QUEUE_STATIC_DECLARE( \
100 ewf_interface_ra_uart__implementation__##interface_name_symb.rx_queue_ptr, \
101 ewf_interface_ra_uart__uart_rx_queue__##interface_name_symb, \
103 EWF_INTERFACE_RA_UART_CONFIG_UART_RX_QUEUE_SIZE); \
104 EWF_PLATFORM_QUEUE_STATIC_DECLARE( \
105 ewf_interface_ra_uart__interface__##interface_name_symb.response_queue_ptr, \
106 ewf_interface_ra_uart__response_queue__##interface_name_symb, \
107 ewf_interface_message, \
108 EWF_INTERFACE_RA_UART_CONFIG_RESPONSE_QUEUE_SIZE); \
109 EWF_PLATFORM_QUEUE_STATIC_DECLARE( \
110 ewf_interface_ra_uart__interface__##interface_name_symb.urc_queue_ptr, \
111 ewf_interface_ra_uart__urc_queue__##interface_name_symb, \
112 ewf_interface_message, \
113 EWF_INTERFACE_RA_UART_CONFIG_URC_QUEUE_SIZE); \
114 ewf_interface_ra_uart__interface__##interface_name_symb.hardware_start = ewf_interface_ra_uart_hardware_start; \
115 ewf_interface_ra_uart__interface__##interface_name_symb.hardware_stop = ewf_interface_ra_uart_hardware_stop; \
116 ewf_interface_ra_uart__interface__##interface_name_symb.hardware_send = ewf_interface_ra_uart_hardware_send; \
117 ewf_interface_ra_uart__interface__##interface_name_symb.hardware_receive = ewf_interface_ra_uart_hardware_receive; \
118 ewf_interface_ra_uart__interface__##interface_name_symb.implementation_ptr = &(ewf_interface_ra_uart__implementation__##interface_name_symb); \
119 interface_ptr = &(ewf_interface_ra_uart__interface__##interface_name_symb); \
120 EWF_INTERFACE_RA_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_ra_uart_hardware_send(ewf_interface *interface_ptr, const uint8_t *buffer_ptr, uint32_t buffer_length)
Send a buffer using the RA UART hardware interface.
Definition: ewf_interface_ra_uart.c:102
ewf_result ewf_interface_ra_uart_hardware_stop(ewf_interface *interface_ptr)
Stop the RA UART hardware interface.
Definition: ewf_interface_ra_uart.c:87
struct _ewf_interface_ra_uart ewf_interface_ra_uart
The RA UART interface implementation data structure type.
ewf_result ewf_interface_ra_uart_hardware_receive(ewf_interface *interface_ptr, uint8_t *buffer_ptr, uint32_t *buffer_length_ptr, bool wait)
Receive a buffer using the RA UART hardware interface.
Definition: ewf_interface_ra_uart.c:142
ewf_result ewf_interface_ra_uart_hardware_start(ewf_interface *interface_ptr)
Start the RA UART hardware interface.
Definition: ewf_interface_ra_uart.c:62
The RA UART interface implementation data structure type.
Definition: ewf_interface_ra_uart.h:52
The interface structure definition.
Definition: ewf_interface.h:66