aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/sys/serial.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/sys/sys/serial.h b/sys/sys/serial.h
index b2da55dc4400..e8f455e2f2c4 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_ */