diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-11-10 23:58:33 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-11-10 23:58:33 +0000 |
commit | 2122c51a9c9d5935773d3a542248bd8f369b172c (patch) | |
tree | b63f7f44c0aa7855d89ccbc1678bbe6a1c33db55 /vl.h | |
parent | f8d179e33d71ddac580fb41f2b452099e7805d67 (diff) |
char dev ioctls
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1610 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vl.h')
-rw-r--r-- | vl.h | 28 |
1 files changed, 20 insertions, 8 deletions
@@ -200,6 +200,24 @@ void qemu_del_fd_read_handler(int fd); #define CHR_EVENT_BREAK 0 /* serial break char */ #define CHR_EVENT_FOCUS 1 /* focus to this terminal (modal input needed) */ + + +#define CHR_IOCTL_SERIAL_SET_PARAMS 1 +typedef struct { + int speed; + int parity; + int data_bits; + int stop_bits; +} QEMUSerialSetParams; + +#define CHR_IOCTL_SERIAL_SET_BREAK 2 + +#define CHR_IOCTL_PP_READ_DATA 3 +#define CHR_IOCTL_PP_WRITE_DATA 4 +#define CHR_IOCTL_PP_READ_CONTROL 5 +#define CHR_IOCTL_PP_WRITE_CONTROL 6 +#define CHR_IOCTL_PP_READ_STATUS 7 + typedef void IOEventHandler(void *opaque, int event); typedef struct CharDriverState { @@ -207,10 +225,7 @@ typedef struct CharDriverState { void (*chr_add_read_handler)(struct CharDriverState *s, IOCanRWHandler *fd_can_read, IOReadHandler *fd_read, void *opaque); - void (*chr_set_serial_parameters)(struct CharDriverState *s, - int speed, int parity, - int data_bits, int stop_bits); - void (*chr_set_serial_break)(struct CharDriverState *s, int enable); + int (*chr_ioctl)(struct CharDriverState *s, int cmd, void *arg); IOEventHandler *chr_event; void (*chr_send_event)(struct CharDriverState *chr, int event); void *opaque; @@ -223,10 +238,7 @@ void qemu_chr_add_read_handler(CharDriverState *s, IOCanRWHandler *fd_can_read, IOReadHandler *fd_read, void *opaque); void qemu_chr_add_event_handler(CharDriverState *s, IOEventHandler *chr_event); -void qemu_chr_set_serial_parameters(CharDriverState *s, - int speed, int parity, - int data_bits, int stop_bits); -void qemu_chr_set_serial_break(CharDriverState *s, int enable); +int qemu_chr_ioctl(CharDriverState *s, int cmd, void *arg); /* consoles */ |