From ae35953d04fb78de20eb0608d4bc3f111ee9d840 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 21 Oct 1997 16:18:03 +0000 Subject: Added termios submission from Eric Norum and Katsutoshi Shibuya. --- cpukit/libcsupport/include/rtems/libio.h | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'cpukit/libcsupport/include') diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcsupport/include/rtems/libio.h index d77480e4af..2761a333c6 100644 --- a/cpukit/libcsupport/include/rtems/libio.h +++ b/cpukit/libcsupport/include/rtems/libio.h @@ -32,7 +32,7 @@ typedef struct { char *pathname; /* opened pathname */ Objects_Id sem; unsigned32 data0; /* private to "driver" */ - unsigned32 data1; /* ... */ + void *data1; /* ... */ } rtems_libio_t; @@ -105,7 +105,7 @@ int __rtems_isatty(int _fd); typedef struct { int (*open)(const char *pathname, unsigned32 flag, unsigned32 mode); int (*close)(int fd); - int (*read)(int fd, void *buffer, unsigned32 count); + int (*read)(int fd, void *buffer); int (*write)(int fd, const void *buffer, unsigned32 count); int (*ioctl)(int fd, unsigned32 command, void *buffer); int (*lseek)(int fd, rtems_libio_offset_t offset, int whence); @@ -128,4 +128,24 @@ void rtems_register_libio_handler(int handler_flag, #define RTEMS_IO_GET_ATTRIBUTES 1 #define RTEMS_IO_SET_ATTRIBUTES 2 +/* + * Termios prototypes + */ +void rtems_termios_initialize (void); +rtems_status_code rtems_termios_open ( + rtems_device_major_number major, + rtems_device_minor_number minor, + void *arg, + int (*deviceFirstOpen)(int major, int minor, void *arg), + int (*deviceLastClose)(int major, int minor, void *arg), + int (*deviceRead)(int minor, char *buf), + int (*deviceWrite)(int minor, char *buf, int len) + ); + +rtems_status_code rtems_termios_close (void *arg); +rtems_status_code rtems_termios_read (void *arg); +rtems_status_code rtems_termios_write (void *arg); +rtems_status_code rtems_termios_ioctl (void *arg); +void rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len); + #endif /* _RTEMS_LIBIO_H */ -- cgit v1.2.3