diff options
author | marcel <marcel@FreeBSD.org> | 2006-02-24 02:24:10 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2006-02-24 02:24:10 +0000 |
commit | 2646169b8f17fa344ce923a042854742e95bc592 (patch) | |
tree | 412ef58a7f59c497b395317765f546e5048b7ceb /sys/sys/serial.h | |
parent | e49c8d57fa8e2a5f6e8ac0f5b33e014f7b845113 (diff) | |
download | FreeBSD-src-2646169b8f17fa344ce923a042854742e95bc592.zip FreeBSD-src-2646169b8f17fa344ce923a042854742e95bc592.tar.gz |
MFp4:
o Add defines for the 5 interrupt sources typical for serial devices.
These defines can be used for more finegrained interrupt handling
between drivers that cooperatively handle multiple serial ports.
o Add defines for the various bitmasks applicable when all information
is passed between drivers as a single integral.
Diffstat (limited to 'sys/sys/serial.h')
-rw-r--r-- | sys/sys/serial.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sys/sys/serial.h b/sys/sys/serial.h index b2da55d..e8f455e 100644 --- a/sys/sys/serial.h +++ b/sys/sys/serial.h @@ -49,6 +49,8 @@ #define SER_RI 0x0040 /* ring indicate */ #define SER_DSR 0x0080 /* data set ready */ +#define SER_MASK_STATE 0x00ff + /* Delta bits, used to indicate which signals should/was affected */ #define SER_DELTA(x) ((x) << 8) @@ -61,4 +63,23 @@ #define SER_DRI SER_DELTA(SER_RI) #define SER_DDSR SER_DELTA(SER_DSR) +#define SER_MASK_DELTA SER_DELTA(SER_MASK_STATE) + +/* + * Specification of interrupt sources typical for serial ports. These are + * useful when some umbrella driver like scc(4) has enough knowledge of + * the hardware to obtain the set of pending interrupts but does not itself + * handle the interrupt. Each interrupt source can be given an interrupt + * resource for which inferior drivers can install handlers. The lower 16 + * bits are kept free for the signals above. + */ +#define SER_INT_OVERRUN 0x010000 +#define SER_INT_BREAK 0x020000 +#define SER_INT_RXREADY 0x040000 +#define SER_INT_SIGCHG 0x080000 +#define SER_INT_TXIDLE 0x100000 + +#define SER_INT_MASK 0xff0000 +#define SER_INT_SIGMASK (SER_MASK_DELTA | SER_MASK_STATE) + #endif /* !_SYS_SERIAL_H_ */ |