Last change
on this file since a660e9dc was
a660e9dc,
checked in by Sebastian Huber <sebastian.huber@…>, on 09/08/22 at 08:37:05
|
Do not use RTEMS_INLINE_ROUTINE
Directly use "static inline" which is available in C99 and later. This brings
the RTEMS implementation closer to standard C.
Close #3935.
|
-
Property mode set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief /dev/ptyXX (A first version for pseudo-terminals) |
---|
5 | */ |
---|
6 | |
---|
7 | /* |
---|
8 | * Copyright (c) 2001 Fernando Ruiz Casas <fruizcasas@gmail.com> |
---|
9 | * |
---|
10 | * This program is distributed in the hope that it will be useful, |
---|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
---|
13 | */ |
---|
14 | |
---|
15 | #ifndef _RTEMS_PTY_H |
---|
16 | #define _RTEMS_PTY_H |
---|
17 | |
---|
18 | #ifdef __cplusplus |
---|
19 | extern "C" { |
---|
20 | #endif |
---|
21 | |
---|
22 | #include <rtems/termiostypes.h> |
---|
23 | |
---|
24 | #define RTEMS_PTY_SB_MAX 16 |
---|
25 | |
---|
26 | typedef struct { |
---|
27 | rtems_termios_device_context base; |
---|
28 | rtems_termios_tty *ttyp; |
---|
29 | tcflag_t c_cflag; |
---|
30 | int socket; |
---|
31 | int last_cr; |
---|
32 | unsigned iac_mode; |
---|
33 | unsigned char sb_buf[RTEMS_PTY_SB_MAX]; |
---|
34 | int sb_ind; |
---|
35 | int width; |
---|
36 | int height; |
---|
37 | char name[sizeof("/dev/pty18446744073709551615")]; |
---|
38 | } rtems_pty_context; |
---|
39 | |
---|
40 | const char *rtems_pty_initialize(rtems_pty_context *pty, uintptr_t unique); |
---|
41 | |
---|
42 | static inline const char *rtems_pty_get_path(const rtems_pty_context *pty) |
---|
43 | { |
---|
44 | return pty->name; |
---|
45 | } |
---|
46 | |
---|
47 | void rtems_pty_close_socket(rtems_pty_context *pty); |
---|
48 | |
---|
49 | void rtems_pty_set_socket(rtems_pty_context *pty, int socket); |
---|
50 | |
---|
51 | #ifdef __cplusplus |
---|
52 | } |
---|
53 | #endif |
---|
54 | |
---|
55 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.