9 #ifndef _EMBEDDED_RPC__USB_CDC_TRANSPORT_H_ 10 #define _EMBEDDED_RPC__USB_CDC_TRANSPORT_H_ 12 #include "erpc_config_internal.h" 14 #if !ERPC_THREADS_IS(NONE) 21 #include "fsl_component_serial_manager.h" 56 UsbCdcTransport(serial_handle_t serialHandle, serial_manager_config_t *serialConfig,
57 serial_port_usb_cdc_config_t *usbCdcConfig, uint8_t *usbRingBuffer, uint32_t usbRingBufferLength);
88 #if !ERPC_THREADS_IS(NONE) 93 serial_handle_t m_serialHandle;
94 serial_manager_config_t *m_serialConfig;
95 serial_port_usb_cdc_config_t *m_usbCdcConfig;
96 uint8_t *m_usbRingBuffer;
97 uint32_t m_usbRingBufferLength;
111 virtual erpc_status_t underlyingReceive(uint8_t *data, uint32_t size)
override;
121 virtual erpc_status_t underlyingSend(
const uint8_t *data, uint32_t size)
override;
Base class for framed transport layers.
Definition: erpc_framed_transport.hpp:56
enum _erpc_status erpc_status_t
Type used for all status and error return values.
Definition: erpc_common.h:85
Very basic transport to send/receive messages via virtual USB CDC port.
Definition: erpc_usb_cdc_transport.hpp:40
void tx_cb(void)
Function called from Serial Manager Tx Callback to unblock the send function.
Definition: erpc_usb_cdc_transport.cpp:66
virtual erpc_status_t underlyingReceive(MessageBuffer *message, uint32_t size, uint32_t offset)
Adds ability to framed transport to overwrite MessageBuffer when receiving data.
Definition: erpc_framed_transport.cpp:177
virtual erpc_status_t init(void)
Initialize USB CDC peripheral configuration structure with values specified in UsbCdcTransport constr...
Definition: erpc_usb_cdc_transport.cpp:106
Definition: erpc_arbitrated_client_manager.hpp:25
Semaphore m_rxSemaphore
Definition: erpc_usb_cdc_transport.hpp:89
virtual ~UsbCdcTransport(void)
Destructor.
Definition: erpc_usb_cdc_transport.cpp:98
UsbCdcTransport(serial_handle_t serialHandle, serial_manager_config_t *serialConfig, serial_port_usb_cdc_config_t *usbCdcConfig, uint8_t *usbRingBuffer, uint32_t usbRingBufferLength)
Constructor.
Definition: erpc_usb_cdc_transport.cpp:84
virtual erpc_status_t underlyingSend(MessageBuffer *message, uint32_t size, uint32_t offset)
Adds ability to framed transport to overwrite MessageBuffer when sending data.
Definition: erpc_framed_transport.cpp:170
Semaphore m_txSemaphore
Definition: erpc_usb_cdc_transport.hpp:90
Simple semaphore class.
Definition: erpc_threading.h:442
void rx_cb(void)
Function called from Serial Manager Rx Callback to unblock the receive function.
Definition: erpc_usb_cdc_transport.cpp:75