Zephyr Project API 3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
uart_console.h File Reference
#include <zephyr/kernel.h>

Go to the source code of this file.

Functions

void uart_register_input (struct k_fifo *avail, struct k_fifo *lines, uint8_t(*completion)(char *str, uint8_t len))
 Register uart input processing.
 

Function Documentation

◆ uart_register_input()

void uart_register_input ( struct k_fifo avail,
struct k_fifo lines,
uint8_t(*)(char *str, uint8_t len)  completion 
)

Register uart input processing.

Input processing is started when string is typed in the console. Carriage return is translated to NULL making string always NULL terminated. Application before calling register function need to initialize two fifo queues mentioned below.

Parameters
availk_fifo queue keeping available input slots
linesk_fifo queue of entered lines which to be processed in the application code.
completioncallback for tab completion of entered commands