eRPC API Reference  Rev. 1.9.0
NXP Semiconductors
erpc::UartTransport Class Reference

Very basic transport to send/receive messages via UART. More...

#include <erpc_uart_cmsis_transport.h>

+ 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...
 
- Public Member Functions inherited from erpc::FramedTransport
 FramedTransport (void)
 Constructor.
 
virtual ~FramedTransport (void)
 FramedTransport destructor.
 
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...
 
- 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
 
- Protected Attributes inherited from erpc::FramedTransport
Crc16m_crcImpl
 
Mutex m_sendLock
 Mutex protecting send.
 
Mutex m_receiveLock
 Mutex protecting receive.
 

Additional Inherited Members

Detailed Description

Very basic transport to send/receive messages via UART.

Constructor & Destructor Documentation

UartTransport::UartTransport ( ARM_DRIVER_USART *  uartDrv)

Constructor.

Parameters
[in]uartDrvCmsis uart.

Member Function Documentation

erpc_status_t UartTransport::init ( void  )
virtual

Initialize CMSIS UART peripheral configuration structure with values specified in UartTransport constructor.

Return values
kErpcStatus_InitFailedWhen UART init function failed.
kErpcStatus_SuccessWhen 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.

Member Data Documentation

ARM_DRIVER_USART* erpc::UartTransport::m_uartDrv
protected

Access structure of the USART Driver

Semaphore erpc::UartTransport::m_rxSemaphore
protected

Semaphore used by RTOS to block task until the receiving is not complete

Semaphore erpc::UartTransport::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: