eRPC API Reference  Rev. 1.7.2
NXP Semiconductors
Transport Setup

Transport layer initialization. More...

Overview

Transport layer initialization.

+ Collaboration diagram for Transport Setup:

Files

file  erpc_transport_setup.h
 

Typedefs

typedef struct ErpcTransport * erpc_transport_t
 Opaque transport object type.
 
typedef void(* rpmsg_ready_cb) (void)
 Ready callback object type for RPMsg-Lite transport.
 

CMSIS UART transport setup

erpc_transport_t erpc_transport_cmsis_uart_init (void *uartDrv)
 Create a CMSIS UART transport. More...
 

Host PC serial port transport setup

erpc_transport_t erpc_transport_serial_init (const char *portName, long baudRate)
 Create a host PC serial port transport. More...
 

SPI transport setup

erpc_transport_t erpc_transport_spi_master_init (void *baseAddr, uint32_t baudRate, uint32_t srcClock_Hz)
 Create a SPI master transport. More...
 
erpc_transport_t erpc_transport_spi_slave_init (void *baseAddr, uint32_t baudRate, uint32_t srcClock_Hz)
 Create a SPI slave transport. More...
 

DSPI transport setup

erpc_transport_t erpc_transport_dspi_master_init (void *baseAddr, uint32_t baudRate, uint32_t srcClock_Hz)
 Create a DSPI master transport. More...
 
erpc_transport_t erpc_transport_dspi_slave_init (void *baseAddr, uint32_t baudRate, uint32_t srcClock_Hz)
 Create a DSPI slave transport. More...
 

MU transport setup

erpc_transport_t erpc_transport_mu_init (void *baseAddr)
 Create an MU transport. More...
 

RPMsg-Lite transport setup

erpc_transport_t erpc_transport_rpmsg_lite_master_init (unsigned long src_addr, unsigned long dst_addr, int rpmsg_link_id)
 Create an RPMsg-Lite transport. More...
 
erpc_transport_t erpc_transport_rpmsg_lite_remote_init (unsigned long src_addr, unsigned long dst_addr, void *start_address, int rpmsg_link_id, rpmsg_ready_cb ready, char *nameservice_name)
 Create an RPMsg-Lite transport. More...
 
erpc_transport_t erpc_transport_rpmsg_lite_rtos_master_init (unsigned long src_addr, unsigned long dst_addr, int rpmsg_link_id)
 Create an RPMsg-Lite RTOS transport. More...
 
erpc_transport_t erpc_transport_rpmsg_lite_rtos_remote_init (unsigned long src_addr, unsigned long dst_addr, void *start_address, int rpmsg_link_id, rpmsg_ready_cb ready, char *nameservice_name)
 Create an RPMsg-Lite RTOS transport. More...
 
erpc_transport_t erpc_transport_rpmsg_lite_tty_rtos_remote_init (unsigned long src_addr, unsigned long dst_addr, void *start_address, int rpmsg_link_id, rpmsg_ready_cb ready, char *nameservice_name)
 Create an RPMsg-Lite TTY transport. More...
 

Linux RPMSG endpoint setup

erpc_transport_t erpc_transport_rpmsg_linux_init (int16_t local_addr, int8_t type, int16_t remote_addr)
 Create an Linux RPMSG endpoint transport. More...
 
void erpc_transport_rpmsg_linux_deinit (void)
 Deinitialize an Linux RPMSG endpoint transport. More...
 

Function Documentation

erpc_transport_t erpc_transport_cmsis_uart_init ( void *  uartDrv)

Create a CMSIS UART transport.

Create a CMSIS UART transport instance, to be used on both the server and the client side.

Parameters
[in]uartDrvCMSIS USART driver structure address (Driver Control Block).
Returns
Return NULL or erpc_transport_t instance pointer.
erpc_transport_t erpc_transport_serial_init ( const char *  portName,
long  baudRate 
)

Create a host PC serial port transport.

Create a host PC serial port transport instance.

Parameters
[in]portNamePort name.
[in]baudRateBaud rate.
Returns
Return NULL or erpc_transport_t instance pointer.
erpc_transport_t erpc_transport_spi_master_init ( void *  baseAddr,
uint32_t  baudRate,
uint32_t  srcClock_Hz 
)

Create a SPI master transport.

Create SPI master transport instance, to be used at master core.

Parameters
[in]baseAddrBase address of SPI peripheral used in this transport layer.
[in]baudRateSPI baud rate.
[in]srcClock_HzSPI source clock in Hz.
Returns
Return NULL or erpc_transport_t instance pointer.
erpc_transport_t erpc_transport_spi_slave_init ( void *  baseAddr,
uint32_t  baudRate,
uint32_t  srcClock_Hz 
)

Create a SPI slave transport.

Create SPI slave transport instance, to be used at slave core.

Parameters
[in]baseAddrBase address of SPI peripheral used in this transport layer.
[in]baudRateSPI baud rate.
[in]srcClock_HzSPI source clock in Hz.
Returns
Return NULL or erpc_transport_t instance pointer.
erpc_transport_t erpc_transport_dspi_master_init ( void *  baseAddr,
uint32_t  baudRate,
uint32_t  srcClock_Hz 
)

Create a DSPI master transport.

Create DSPI master transport instance, to be used at master core.

Parameters
[in]baseAddrBase address of DSPI peripheral used in this transport layer.
[in]baudRateDSPI baud rate.
[in]srcClock_HzDSPI source clock in Hz.
Returns
Return NULL or erpc_transport_t instance pointer.
erpc_transport_t erpc_transport_dspi_slave_init ( void *  baseAddr,
uint32_t  baudRate,
uint32_t  srcClock_Hz 
)

Create a DSPI slave transport.

Create DSPI slave transport instance, to be used at slave core.

Parameters
[in]baseAddrBase address of DSPI peripheral used in this transport layer.
[in]baudRateDSPI baud rate.
[in]srcClock_HzDSPI source clock in Hz.
Returns
Return NULL or erpc_transport_t instance pointer.
erpc_transport_t erpc_transport_mu_init ( void *  baseAddr)

Create an MU transport.

Create Messaging Unit (MU) transport instance, to be used on both the server and the client side. Base address of the MU peripheral needs to be passed.

Parameters
[in]baseAddrBase address of MU peripheral.
Returns
Return NULL or erpc_transport_t instance pointer.
erpc_transport_t erpc_transport_rpmsg_lite_master_init ( unsigned long  src_addr,
unsigned long  dst_addr,
int  rpmsg_link_id 
)

Create an RPMsg-Lite transport.

Create RPMsg-Lite baremetal transport instance, to be used at master core.

Parameters
[in]src_addrAddress of local RPMsg endpoint used for communication.
[in]dst_addrAddress of remote RPMsg endpoint used for communication.
[in]rpmsg_link_idLink ID used to define the rpmsg-lite instance, see rpmsg_platform.h
Returns
Return NULL or erpc_transport_t instance pointer.
erpc_transport_t erpc_transport_rpmsg_lite_remote_init ( unsigned long  src_addr,
unsigned long  dst_addr,
void *  start_address,
int  rpmsg_link_id,
rpmsg_ready_cb  ready,
char *  nameservice_name 
)

Create an RPMsg-Lite transport.

Create RPMsg-Lite baremetal transport instance, to be used at slave/remote core.

Parameters
[in]src_addrAddress of local RPMsg endpoint used for communication.
[in]dst_addrAddress of remote RPMsg endpoint used for communication.
[in]start_addressShared memory base address used for this instance of RPMsg-Lite.
[in]rpmsg_link_idLink ID used to define the rpmsg-lite instance, see rpmsg_platform.h.
[in]readyCallback function, which gets called, when RPMsg is initialized and master core can be notified.
[in]nameservice_nameName of the nameservice channel to be announced to the other core.
Returns
Return NULL or erpc_transport_t instance pointer.
erpc_transport_t erpc_transport_rpmsg_lite_rtos_master_init ( unsigned long  src_addr,
unsigned long  dst_addr,
int  rpmsg_link_id 
)

Create an RPMsg-Lite RTOS transport.

Create RPMsg-Lite RTOS transport instance, to be used at master core.

Parameters
[in]src_addrAddress of local RPMsg endpoint used for communication.
[in]dst_addrAddress of remote RPMsg endpoint used for communication.
[in]rpmsg_link_idLink ID used to define the rpmsg-lite instance, see rpmsg_platform.h
Returns
Return NULL or erpc_transport_t instance pointer.
erpc_transport_t erpc_transport_rpmsg_lite_rtos_remote_init ( unsigned long  src_addr,
unsigned long  dst_addr,
void *  start_address,
int  rpmsg_link_id,
rpmsg_ready_cb  ready,
char *  nameservice_name 
)

Create an RPMsg-Lite RTOS transport.

Create RPMsg-Lite RTOS transport instance, to be used at slave/remote core.

Parameters
[in]src_addrAddress of local RPMsg endpoint used for communication.
[in]dst_addrAddress of remote RPMsg endpoint used for communication.
[in]start_addressShared memory base address used for this instance of RPMsg-Lite.
[in]rpmsg_link_idLink ID used to define the rpmsg-lite instance, see rpmsg_platform.h.
[in]readyCallback function, which gets called, when RPMsg is initialized and master core can be notified.
[in]nameservice_nameName of the nameservice channel to be announced to the other core.
Returns
Return NULL or erpc_transport_t instance pointer.
erpc_transport_t erpc_transport_rpmsg_lite_tty_rtos_remote_init ( unsigned long  src_addr,
unsigned long  dst_addr,
void *  start_address,
int  rpmsg_link_id,
rpmsg_ready_cb  ready,
char *  nameservice_name 
)

Create an RPMsg-Lite TTY transport.

Create RPMsg-Lite TTY transport instance, to be used at slave/remote core. This function is mainly used with Linux running on the master core.

Parameters
[in]src_addrAddress of local RPMsg endpoint used for communication.
[in]dst_addrAddress of remote RPMsg endpoint used for communication.
[in]start_addressShared memory base address used for this instance of RPMsg-Lite.
[in]rpmsg_link_idLink ID used to define the rpmsg-lite instance, see rpmsg_platform.h.
[in]readyCallback function, which gets called, when RPMsg is initialized and master core can be notified.
[in]nameservice_nameName of the nameservice channel to be announced to the other core.
Returns
Return NULL or erpc_transport_t instance pointer.
erpc_transport_t erpc_transport_rpmsg_linux_init ( int16_t  local_addr,
int8_t  type,
int16_t  remote_addr 
)

Create an Linux RPMSG endpoint transport.

This function is using RPMSG endpoints based on this implementation: https://github.com/NXPmicro/rpmsg-sysfs/tree/0aa1817545a765c200b1b2f9b6680a420dcf9171 .

When local/remote address is set to '-1', then default addresses will be used. When type is set to '0', then Datagram model will be used, else Stream.

Parameters
[in]local_addrLocal endpoint address.
[in]typeDatagram (0) or Stream (1).
[in]remote_addrRemote endpoint address.
Returns
Return NULL or erpc_transport_t instance pointer.
void erpc_transport_rpmsg_linux_deinit ( void  )

Deinitialize an Linux RPMSG endpoint transport.

This function deinitializes the Linux RPMSG endpoint transport.