Zephyr API Documentation 3.7.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
console.h File Reference

Go to the source code of this file.

Data Structures

struct  console_input
 Console input representation. More...
 

Macros

#define CONSOLE_MAX_LINE_LEN   CONFIG_CONSOLE_INPUT_MAX_LINE_LEN
 

Typedefs

typedef void(* console_input_fn) (struct k_fifo *avail, struct k_fifo *lines, uint8_t(*completion) (char *str, uint8_t len))
 Console input processing handler signature.
 

Macro Definition Documentation

◆ CONSOLE_MAX_LINE_LEN

#define CONSOLE_MAX_LINE_LEN   CONFIG_CONSOLE_INPUT_MAX_LINE_LEN

Typedef Documentation

◆ console_input_fn

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

Console input processing handler signature.

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