Very basic transport to send/receive messages via virtual USB CDC port.
More...
#include <erpc_usb_cdc_transport.h>
Very basic transport to send/receive messages via virtual USB CDC port.
UsbCdcTransport::UsbCdcTransport |
( |
serial_handle_t |
serialHandle, |
|
|
serial_manager_config_t * |
serialConfig, |
|
|
serial_port_usb_cdc_config_t * |
usbCdcConfig, |
|
|
uint8_t * |
usbRingBuffer, |
|
|
uint32_t |
usbRingBufferLength |
|
) |
| |
Constructor.
- Parameters
-
[in] | serialHandle | Pointer to point to a memory space of size #SERIAL_MANAGER_HANDLE_SIZE allocated by the caller, see serial manager header file. |
[in] | serialConfig | Pointer to user-defined configuration structure allocated by the caller, see serial manager header file. |
[in] | usbCdcConfig | Pointer to serial port usb config structure allocated by the caller, see serial manager header file. |
[in] | usbRingBuffer | Pointer to point serial manager ring buffer allocated by the caller, see serial manager header file. |
[in] | usbRingBufferLength | Serial manager ring buffer size. |
Initialize USB CDC peripheral configuration structure with values specified in UsbCdcTransport constructor.
- Return values
-
kErpcStatus_InitFailed | When USB CDC init function failed. |
kErpcStatus_Success | When USB CDC init function was executed successfully. |
void UsbCdcTransport::rx_cb |
( |
void |
| ) |
|
Function called from Serial Manager Rx Callback to unblock the receive function.
Unblocks the receive function.
void UsbCdcTransport::tx_cb |
( |
void |
| ) |
|
Function called from Serial Manager Tx Callback to unblock the send function.
Unblocks the send function.
Semaphore erpc::UsbCdcTransport::m_rxSemaphore |
|
protected |
Semaphore used by RTOS to block task until the receiving is not complete
Semaphore erpc::UsbCdcTransport::m_txSemaphore |
|
protected |
Semaphore used by RTOS to block task until the sending is not complete
The documentation for this class was generated from the following files: