open a control channel to a console
#include <sys/console.h> struct _console_ctrl *console_open( int fd, unsigned mode );
The console_open() function opens a control channel to the device driver of a console device. The device must be a console device, and must have been previously opened. The fd argument refers to this opened device.
The mode argument is an access mode (see <fcntl.h>). The only supported mode is O_RDWR.
A pointer to an allocated control structure is returned, which is to be used by subsequent console functions.
The console class of functions allow direct reads and writes to the console device for high speed I/O to such devices.
The console_open() function returns a pointer to a control structure that is used in subsequent calls to the other console functions. On error, NULL is returned, and errno is set.
See console_read().
QNX
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | Yes |
console_active(), console_arm(), console_close(), console_ctrl(), console_font(), console_info(), console_protocol(), console_read(), console_size(), console_state(), console_write(), errno