XCORE SDK
XCORE Software Development Kit
Functions
rtos_intertile_driver_core

Functions

void rtos_intertile_tx_len (rtos_intertile_t *ctx, uint8_t port, size_t len)
 
size_t rtos_intertile_tx_data (rtos_intertile_t *ctx, void *data, size_t len)
 
void rtos_intertile_tx (rtos_intertile_t *ctx, uint8_t port, void *msg, size_t len)
 
size_t rtos_intertile_rx_len (rtos_intertile_t *ctx, uint8_t port, unsigned timeout)
 
size_t rtos_intertile_rx_data (rtos_intertile_t *ctx, void *data, size_t len)
 
size_t rtos_intertile_rx (rtos_intertile_t *ctx, uint8_t port, void **msg, unsigned timeout)
 

Detailed Description

The core functions for using an RTOS intertile driver instance after it has been initialized and started.

Function Documentation

◆ rtos_intertile_rx()

size_t rtos_intertile_rx ( rtos_intertile_t ctx,
uint8_t  port,
void **  msg,
unsigned  timeout 
)

Receives data from an intertile link.

Note
the buffer returned via msg must be freed by the application using rtos_osal_free().
Parameters
ctxA pointer to the intertile driver instance to use.
portThe number of the port to listen for data on. Only data sent to this port by the remote tile will be received.
Note
It is important that no other thread listen on this port simultaneously. If this happens, it is undefined which one will receive the data, and it is possible for a resource exception to occur.
Parameters
msgA pointer to the received data is written to this pointer variable. This buffer is obtained from the heap and must be freed by the application using rtos_osal_free().
timeoutThe amount of time to wait before data become available.
Returns
the number of bytes received.

◆ rtos_intertile_tx()

void rtos_intertile_tx ( rtos_intertile_t ctx,
uint8_t  port,
void *  msg,
size_t  len 
)

Transmits data to an intertile link.

Parameters
ctxA pointer to the intertile driver instance to use.
portThe number of the port to send the data to. Only the thread listening on this particular port on the remote tile will receive this data.
msgA pointer to the data buffer to transmit.
lenThe number of bytes from the buffer to transmit.