Zephyr API 3.6.99
|
Pipe UART driver header file. More...
#include <stdlib.h>
Go to the source code of this file.
Typedefs | |
typedef uint8_t *(* | uart_pipe_recv_cb) (uint8_t *buf, size_t *off) |
Received data callback. | |
Functions | |
void | uart_pipe_register (uint8_t *buf, size_t len, uart_pipe_recv_cb cb) |
Register UART application. | |
int | uart_pipe_send (const uint8_t *data, int len) |
Send data over UART. | |
Pipe UART driver header file.
A pipe UART driver that allows applications to handle all aspects of received protocol data.
Received data callback.
This function is called when new data is received on UART. The off parameter can be used to alter offset at which received data is stored. Typically, when the complete data is received and a new buffer is provided off should be set to 0.
buf | Buffer with received data. |
off | Data offset on next received and accumulated data length. |
void uart_pipe_register | ( | uint8_t * | buf, |
size_t | len, | ||
uart_pipe_recv_cb | cb ) |
Register UART application.
This function is used to register new UART application.
buf | Initial buffer for received data. |
len | Size of buffer. |
cb | Callback to be called on data reception. |
int uart_pipe_send | ( | const uint8_t * | data, |
int | len ) |
Send data over UART.
This function is used to send data over UART.
data | Buffer with data to be send. |
len | Size of data. |