![]() |
eRPC API Reference
Rev. 1.12.0
NXP Semiconductors
|
Very basic transport to send/receive messages via UART. More...
#include <erpc_uart_cmsis_transport.hpp>
Inheritance diagram for erpc::UartTransport:
Collaboration diagram for erpc::UartTransport:Public Member Functions | |
| UartTransport (ARM_DRIVER_USART *uartDrv) | |
| Constructor. More... | |
| virtual | ~UartTransport (void) |
| Destructor. | |
| virtual erpc_status_t | init (void) |
| Initialize CMSIS UART peripheral configuration structure with values specified in UartTransport constructor. More... | |
| void | rx_cb (void) |
| Function called from ARM_USART_SignalEvent when ARM_USART_EVENT_RECEIVE_COMPLETE event is asserted. More... | |
| void | tx_cb (void) |
| Function called from ARM_USART_SignalEvent when ARM_USART_EVENT_SEND_COMPLETE event is asserted. More... | |
| UartTransport (struct device *dev) | |
| Constructor. More... | |
| virtual | ~UartTransport (void) |
| Destructor. | |
| virtual erpc_status_t | init (void) |
| Initialize Zephyr UART peripheral configuration structure with values specified in UartTransport constructor. More... | |
| void | rx_cb (void) |
| Function called from ARM_USART_SignalEvent when ARM_USART_EVENT_RECEIVE_COMPLETE event is asserted. More... | |
| void | tx_cb (void) |
| Function called from ARM_USART_SignalEvent when ARM_USART_EVENT_SEND_COMPLETE event is asserted. 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 | |
| ARM_DRIVER_USART * | m_uartDrv |
| Semaphore | m_rxSemaphore |
| Semaphore | m_txSemaphore |
| struct device * | m_dev |
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 UART.
Transport to send/receive messages via UART.
|
explicit |
Constructor.
| [in] | uartDrv | Cmsis uart. |
| UartTransport::UartTransport | ( | struct device * | dev | ) |
Constructor.
| [in] | dev | Zephyr uart device. |
|
virtual |
Initialize CMSIS UART peripheral configuration structure with values specified in UartTransport constructor.
| kErpcStatus_InitFailed | When UART init function failed. |
| kErpcStatus_Success | When UART init function was executed successfully. |
| void UartTransport::rx_cb | ( | void | ) |
Function called from ARM_USART_SignalEvent when ARM_USART_EVENT_RECEIVE_COMPLETE event is asserted.
Unblocks the receive function.
| void UartTransport::tx_cb | ( | void | ) |
Function called from ARM_USART_SignalEvent when ARM_USART_EVENT_SEND_COMPLETE event is asserted.
Unblocks the send function.
|
virtual |
Initialize Zephyr UART peripheral configuration structure with values specified in UartTransport constructor.
| kErpcStatus_InitFailed | When UART init function failed. |
| kErpcStatus_Success | When UART init function was executed successfully. |
| void erpc::UartTransport::rx_cb | ( | void | ) |
Function called from ARM_USART_SignalEvent when ARM_USART_EVENT_RECEIVE_COMPLETE event is asserted.
Unblocks the receive function.
| void erpc::UartTransport::tx_cb | ( | void | ) |
Function called from ARM_USART_SignalEvent when ARM_USART_EVENT_SEND_COMPLETE event is asserted.
Unblocks the send function.
|
protected |
Access structure of the USART Driver
|
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
|
protected |
Access structure of the UART device