![]() |
eRPC API Reference
Rev. 1.12.0
NXP Semiconductors
|
Very basic transport to send/receive messages via virtual USB CDC port. More...
#include <erpc_usb_cdc_transport.hpp>
Inheritance diagram for erpc::UsbCdcTransport:
Collaboration diagram for erpc::UsbCdcTransport:Public Member Functions | |
| UsbCdcTransport (serial_handle_t serialHandle, serial_manager_config_t *serialConfig, serial_port_usb_cdc_config_t *usbCdcConfig, uint8_t *usbRingBuffer, uint32_t usbRingBufferLength) | |
| Constructor. More... | |
| virtual | ~UsbCdcTransport (void) |
| Destructor. | |
| virtual erpc_status_t | init (void) |
| Initialize USB CDC peripheral configuration structure with values specified in UsbCdcTransport constructor. More... | |
| void | rx_cb (void) |
| Function called from Serial Manager Rx Callback to unblock the receive function. More... | |
| void | tx_cb (void) |
| Function called from Serial Manager Tx Callback to unblock the send function. More... | |
Public Member Functions inherited from erpc::FramedTransport | |
| FramedTransport (void) | |
| Constructor. | |
| virtual | ~FramedTransport (void) |
| FramedTransport destructor. | |
| virtual uint8_t | reserveHeaderSize (void) override |
| Size of data placed in MessageBuffer before serializing eRPC data. More... | |
| virtual erpc_status_t | receive (MessageBuffer *message) override |
| Receives an entire message. More... | |
| virtual erpc_status_t | send (MessageBuffer *message) override |
| Function to send prepared message. More... | |
| virtual void | setCrc16 (Crc16 *crcImpl) override |
| This functions sets the CRC-16 implementation. More... | |
| virtual Crc16 * | getCrc16 (void) override |
| This functions gets the CRC-16 object. More... | |
Public Member Functions inherited from erpc::Transport | |
| Transport (void) | |
| Constructor. | |
| virtual | ~Transport (void) |
| Transport destructor. | |
| virtual bool | hasMessage (void) |
| Poll for an incoming message. More... | |
Protected Attributes | |
| Semaphore | m_rxSemaphore |
| Semaphore | m_txSemaphore |
Protected Attributes inherited from erpc::FramedTransport | |
| Crc16 * | m_crcImpl |
| Mutex | m_sendLock |
| Mutex protecting send. | |
| Mutex | m_receiveLock |
| Mutex protecting receive. | |
Additional Inherited Members | |
Protected Member Functions inherited from erpc::FramedTransport | |
| virtual erpc_status_t | underlyingSend (MessageBuffer *message, uint32_t size, uint32_t offset) |
| Adds ability to framed transport to overwrite MessageBuffer when sending data. More... | |
| virtual erpc_status_t | underlyingReceive (MessageBuffer *message, uint32_t size, uint32_t offset) |
| Adds ability to framed transport to overwrite MessageBuffer when receiving data. More... | |
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.
| [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. |
|
virtual |
Initialize USB CDC peripheral configuration structure with values specified in UsbCdcTransport constructor.
| 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.
|
protected |
Semaphore used by RTOS to block task until the receiving is not complete
|
protected |
Semaphore used by RTOS to block task until the sending is not complete