|
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) |
|
The core functions for using an RTOS intertile driver instance after it has been initialized and started.
◆ 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
-
ctx | A pointer to the intertile driver instance to use. |
port | The 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
-
msg | A 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(). |
timeout | The 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
-
ctx | A pointer to the intertile driver instance to use. |
port | The 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. |
msg | A pointer to the data buffer to transmit. |
len | The number of bytes from the buffer to transmit. |