RTEMS
6.1-rc4
Loading...
Searching...
No Matches
bsps
include
grlib
cons.h
1
/* SPDX-License-Identifier: BSD-2-Clause */
2
3
/* Console driver interface to UART drivers
4
*
5
* - First console device that has System Console flag set will be
6
* system console.
7
* - If none of the registered console devices has system console set,
8
* the first is registered device is used, unless it has
9
*
10
* COPYRIGHT (c) 2010.
11
* Cobham Gaisler AB.
12
*
13
* Redistribution and use in source and binary forms, with or without
14
* modification, are permitted provided that the following conditions
15
* are met:
16
* 1. Redistributions of source code must retain the above copyright
17
* notice, this list of conditions and the following disclaimer.
18
* 2. Redistributions in binary form must reproduce the above copyright
19
* notice, this list of conditions and the following disclaimer in the
20
* documentation and/or other materials provided with the distribution.
21
*
22
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
26
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32
* POSSIBILITY OF SUCH DAMAGE.
33
*/
34
35
#ifndef __CONS_H__
36
#define __CONS_H__
37
38
#include <
rtems/termiostypes.h
>
39
40
struct
console_dev
;
41
42
#define CONSOLE_FLAG_SYSCON 0x01
43
#define CONSOLE_FLAG_SYSCON_GRANT 0x02
44
45
struct
console_dev
{
46
rtems_termios_device_context
base;
47
/* Set CONSOLE_FLAG_SYSCON to request this device to be system console
48
* and/or debug console. CONSOLE_FLAG_SYSCON_GRANT will be set on the
49
* device which was selected as system console.
50
*/
51
int
flags;
52
char
*fsname;
/* File system prefix */
53
const
rtems_termios_device_handler
*handler;
54
};
55
56
extern
void
console_dev_register(
struct
console_dev
*dev);
57
#if 0
58
extern
void
console_dev_unregister(
struct
console_dev
*dev);
59
#endif
60
61
#endif
console_dev
Definition:
cons.h:45
rtems_termios_device_context
Termios device context.
Definition:
termiosdevice.h:68
rtems_termios_device_handler
Termios device handler.
Definition:
termiosdevice.h:100
termiostypes.h
Generated by
1.9.6