Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
uart_console.h
Go to the documentation of this file.
1/* uart_console.h - uart console driver */
2
3/*
4 * Copyright (c) 2011, 2014 Wind River Systems, Inc.
5 *
6 * SPDX-License-Identifier: Apache-2.0
7 */
8
9#ifndef ZEPHYR_INCLUDE_DRIVERS_CONSOLE_UART_CONSOLE_H_
10#define ZEPHYR_INCLUDE_DRIVERS_CONSOLE_UART_CONSOLE_H_
11
12#include <kernel.h>
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
32void uart_register_input(struct k_fifo *avail, struct k_fifo *lines,
33 uint8_t (*completion)(char *str, uint8_t len));
34
35/*
36 * Allows having debug hooks in the console driver for handling incoming
37 * control characters, and letting other ones through.
38 */
39#ifdef CONFIG_UART_CONSOLE_DEBUG_SERVER_HOOKS
40#define UART_CONSOLE_DEBUG_HOOK_HANDLED 1
41#define UART_CONSOLE_OUT_DEBUG_HOOK_SIG(x) int(x)(char c)
42typedef UART_CONSOLE_OUT_DEBUG_HOOK_SIG(uart_console_out_debug_hook_t);
43
44void uart_console_out_debug_hook_install(
45 uart_console_out_debug_hook_t *hook);
46
47typedef int (*uart_console_in_debug_hook_t) (uint8_t);
48
49void uart_console_in_debug_hook_install(uart_console_in_debug_hook_t hook);
50
51#endif
52
53#ifdef __cplusplus
54}
55#endif
56
57#endif /* ZEPHYR_INCLUDE_DRIVERS_CONSOLE_UART_CONSOLE_H_ */
__UINT8_TYPE__ uint8_t
Definition: stdint.h:58
Definition: kernel.h:2153
void uart_register_input(struct k_fifo *avail, struct k_fifo *lines, uint8_t(*completion)(char *str, uint8_t len))
Register uart input processing.