source: rtems/bsps/include/bsp/console-termios.h @ 828276b

5
Last change on this file since 828276b was 828276b, checked in by Sebastian Huber <sebastian.huber@…>, on 03/05/19 at 06:58:18

bsps: Adjust shared Doxygen groups

Update #3706.

  • Property mode set to 100644
File size: 2.5 KB
Line 
1/*
2 * Copyright (c) 2014 embedded brains GmbH.  All rights reserved.
3 *
4 *  embedded brains GmbH
5 *  Dornierstr. 4
6 *  82178 Puchheim
7 *  Germany
8 *  <rtems@embedded-brains.de>
9 *
10 * The license and distribution terms for this file may be
11 * found in the file LICENSE in this distribution or at
12 * http://www.rtems.org/license/LICENSE.
13 */
14
15#ifndef BSP_CONSOLE_TERMIOS_H
16#define BSP_CONSOLE_TERMIOS_H
17
18#include <rtems/termiostypes.h>
19
20#ifdef __cplusplus
21extern "C" {
22#endif /* __cplusplus */
23
24/**
25 * @defgroup ConsoleTermios Termios Console Driver
26 *
27 * @ingroup RTEMSBSPsSharedConsole
28 *
29 * @brief Console driver for Termios devices.
30 *
31 * In order to use this driver add the following lines to the Makefile.am of
32 * the BSP:
33 *
34 * @code
35 * libbsp_a_SOURCES += ../../shared/console-termios-init.c
36 * libbsp_a_SOURCES += ../../shared/console-termios.c
37 * libbsp_a_SOURCES += console/console-config.c
38 * @endcode
39 *
40 * Define the console_device_table and console_device_count in the
41 * console-config.c file of the BSP.
42 *
43 * @{
44 */
45
46/**
47 * @brief Console device probe function type.
48 *
49 * @param[in] context The Termios device context.
50 *
51 * @retval true Install this device.
52 * @retval false Otherwise.
53 */
54typedef bool (*console_device_probe)(rtems_termios_device_context *context);
55
56/**
57 * @brief Console device information.
58 */
59typedef struct {
60  /**
61   * @brief The device file path.
62   *
63   * The "/dev/console" device will be automatically installed as the first
64   * device of console_device_table with a successful probe.
65   */
66  const char *device_file;
67
68  /**
69   * @brief The device probe function.
70   */
71  console_device_probe probe;
72
73  /**
74   * @brief The Termios device handler.
75   */
76  const rtems_termios_device_handler *handler;
77
78  /**
79   * @brief The Termios device flow control handler.
80   */
81  const rtems_termios_device_flow *flow;
82
83  /**
84   * @brief The Termios device context.
85   */
86  rtems_termios_device_context *context;
87} console_device;
88
89/**
90 * @brief Returns true and does nothing else.
91 */
92bool console_device_probe_default(rtems_termios_device_context *context);
93
94/**
95 * @brief Table for console devices installed via console_initialize() during
96 * system initialization.
97 *
98 * It must be provided by the BSP.
99 *
100 * @see console_device_count.
101 */
102extern const console_device console_device_table[];
103
104/**
105 * @brief Count of entries in the console_device_table.
106 *
107 * It must be provided by the BSP.
108 */
109extern const size_t console_device_count;
110
111/** @{ */
112
113#ifdef __cplusplus
114}
115#endif /* __cplusplus */
116
117#endif /* BSP_CONSOLE_TERMIOS_H */
Note: See TracBrowser for help on using the repository browser.