16 #ifndef __TERMIOSTYPES_H 17 #define __TERMIOSTYPES_H 42 void (*sw_pfn)(
struct termios *tty,
void *arg);
51 volatile unsigned int Head;
52 volatile unsigned int Tail;
53 volatile unsigned int Size;
61 } rtems_termios_device_mode;
98 #define RTEMS_TERMIOS_DEVICE_CONTEXT_INITIALIZER( name ) \ 99 { RTEMS_INTERRUPT_LOCK_INITIALIZER( name ) } 181 bool (*set_attributes)(
189 rtems_termios_device_mode
mode;
220 rtems_device_major_number major;
221 rtems_device_minor_number minor;
247 rtems_device_major_number major;
248 rtems_device_minor_number minor;
267 int read_start_column;
279 uint32_t rawInBufSemaphoreOptions;
282 unsigned int rawInBufDropped;
289 enum {rob_idle, rob_busy, rob_wait } rawOutBufState;
311 volatile unsigned int flow_ctrl;
312 unsigned int lowwater,highwater;
370 const char *device_file,
371 rtems_device_major_number major,
372 rtems_device_minor_number minor,
395 const char *device_file,
396 rtems_device_major_number major,
397 rtems_device_minor_number minor
406 rtems_device_major_number major,
407 rtems_device_minor_number minor,
496 void rtems_termios_puts (
506 extern int rtems_termios_nlinesw;
515 typedef uint32_t rtems_termios_baud_t;
554 rtems_termios_baud_t baud
RTEMS_INLINE_ROUTINE void rtems_termios_device_context_initialize(rtems_termios_device_context *context, const char *name)
Initializes a device context.
Definition: termiostypes.h:84
RTEMS Associativity Routines.
Parameter block for open/close.
Definition: libio.h:1308
rtems_termios_device_context * device_context
Context for device driver.
Definition: termiostypes.h:341
RTEMS_INLINE_ROUTINE void rtems_termios_device_lock_release(rtems_termios_device_context *context, rtems_interrupt_lock_context *lock_context)
Releases the device lock.
Definition: termiostypes.h:454
This is used to manage each element (node) which is placed on a chain.
Definition: chain.h:65
tcflag_t rtems_termios_number_to_baud(rtems_termios_baud_t baud)
Converts the Integral Baud value baud to the Termios Control Flag Representation. ...
Definition: termios_num2baud.c:23
rtems_status_code rtems_termios_device_install(const char *device_file, rtems_device_major_number major, rtems_device_minor_number minor, const rtems_termios_device_handler *handler, const rtems_termios_device_flow *flow, rtems_termios_device_context *context)
Installs a Termios device.
Definition: termios.c:134
Objects_Id rtems_id
Used to manage and manipulate RTEMS object identifiers.
Definition: types.h:80
Termios device context.
Definition: termiostypes.h:72
#define RTEMS_INLINE_ROUTINE
The following (in conjunction with compiler arguments) are used to choose between the use of static i...
Definition: basedefs.h:135
struct rtems_termios_device_node rtems_termios_device_node
Termios device node for installed devices.
int rtems_termios_set_initial_baud(struct rtems_termios_tty *tty, rtems_termios_baud_t baud)
Sets the initial baud in the Termios context tty.
Definition: termios_setinitialbaud.c:23
Termios device node for installed devices.
Definition: termiostypes.h:218
Parameter block for ioctl.
Definition: libio.h:1317
ssize_t write(int fd, const void *buffer, size_t count)
POSIX 1003.1b 6.4.2 - Write to a File.
Definition: write.c:30
Paramameter block for read/write.
Definition: libio.h:1296
const rtems_assoc_t rtems_termios_baud_table[]
RTEMS Termios Baud Table.
Definition: termios_baudtable.c:23
Definition: termiostypes.h:476
ISR lock control.
Definition: isrlock.h:56
Watchdog_Interval rtems_interval
Used to manage and manipulate intervals specified by clock ticks.
Definition: types.h:119
rtems_status_code rtems_termios_device_remove(const char *device_file, rtems_device_major_number major, rtems_device_minor_number minor)
Removes a Termios device.
Definition: termios.c:190
POSIX Termios Implementation for RTEMS Console Device Driver.
rtems_termios_device_context legacy_device_context
Context for legacy devices using the callbacks.
Definition: termiostypes.h:299
rtems_status_code
Classic API Status.
Definition: status.h:46
Definition: termiostypes.h:232
rtems_termios_device_node * device_node
Corresponding device node.
Definition: termiostypes.h:336
#define rtems_interrupt_lock_initialize(_lock, _name)
Initializes an interrupt lock.
Definition: intr.h:268
RTEMS_INLINE_ROUTINE void rtems_termios_device_lock_acquire(rtems_termios_device_context *context, rtems_interrupt_lock_context *lock_context)
Acquires the device lock.
Definition: termiostypes.h:439
rtems_status_code rtems_termios_device_open(rtems_device_major_number major, rtems_device_minor_number minor, void *arg)
Opens an installed Termios device.
Definition: termios.c:632
Definition: termiostypes.h:41
struct rtems_termios_device_context rtems_termios_device_context
Termios device context.
int rtems_termios_baud_to_index(rtems_termios_baud_t termios_baud)
Convert Bxxx Constant to Index.
Definition: termios_baud2index.c:24
#define rtems_interrupt_lock_release(_lock, _lock_context)
Releases an interrupt lock.
Definition: intr.h:312
RTEMS_INLINE_ROUTINE void * rtems_termios_get_device_context(const rtems_termios_tty *tty)
Returns the device context of an installed Termios device.
Definition: termiostypes.h:425
void rtems_termios_set_best_baud(struct termios *term, uint32_t baud)
Sets the best baud value in the Termios control.
Definition: termios_setbestbaud.c:22
rtems_status_code rtems_termios_device_close(void *arg)
Closes an installed Termios device.
Definition: termios.c:790
Definition: termiostypes.h:49
Local ISR lock context for acquire and release pairs.
Definition: isrlock.h:65
Termios device flow control handler.
Definition: termiostypes.h:197
rtems_termios_device_flow flow
The device flow control handler.
Definition: termiostypes.h:309
#define rtems_interrupt_lock_acquire(_lock, _lock_context)
Acquires an interrupt lock.
Definition: intr.h:295
rtems_termios_device_mode mode
Termios device mode.
Definition: termiostypes.h:189
rtems_termios_device_handler handler
The device handler.
Definition: termiostypes.h:304
Termios device handler.
Definition: termiostypes.h:106
rtems_termios_baud_t rtems_termios_baud_to_number(tcflag_t c_cflag)
Convert Baud Part of Termios control flags to an integral Baud Value.
Definition: termios_baud2num.c:23