diff options
author | marcel <marcel@FreeBSD.org> | 2003-09-11 23:06:42 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2003-09-11 23:06:42 +0000 |
commit | 49dd02f24778121c7cc0834ee7098d793db0a196 (patch) | |
tree | 0bacf5d5df77a2825660a1165c400033575725a0 /sys/dev/uart/uart_bus.h | |
parent | 27c75c8f21b68a051100fcfb4c1ead51af82f27c (diff) | |
download | FreeBSD-src-49dd02f24778121c7cc0834ee7098d793db0a196.zip FreeBSD-src-49dd02f24778121c7cc0834ee7098d793db0a196.tar.gz |
Add support for using uart(4) for pulse capturing for the Pulse Per
Second (PPS) timing interface. The support is non-optional and by
default uses the DCD line signal as the pulse input. A compile-time
option (UART_PPS_ON_CTS) can be used to have uart(4) use the CTS line
signal.
Include <sys/timepps.h> in uart_bus.h to avoid having to add the
inclusion of that header in all source files.
Reviewed by: phk
Diffstat (limited to 'sys/dev/uart/uart_bus.h')
-rw-r--r-- | sys/dev/uart/uart_bus.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sys/dev/uart/uart_bus.h b/sys/dev/uart/uart_bus.h index 71aa1be..bd0bab7 100644 --- a/sys/dev/uart/uart_bus.h +++ b/sys/dev/uart/uart_bus.h @@ -29,6 +29,12 @@ #ifndef _DEV_UART_BUS_H_ #define _DEV_UART_BUS_H_ +#ifndef KLD_MODULE +#include "opt_uart.h" +#endif + +#include <sys/timepps.h> + /* Drain and flush targets. */ #define UART_DRAIN_RECEIVER 0x0001 #define UART_DRAIN_TRANSMITTER 0x0002 @@ -75,6 +81,14 @@ #define UART_SIGMASK_STATE 0x003f #define UART_SIGMASK_DELTA 0x3f00 +#ifdef UART_PPS_ON_CTS +#define UART_SIG_DPPS UART_SIG_DCTS +#define UART_SIG_PPS UART_SIG_CTS +#else +#define UART_SIG_DPPS UART_SIG_DDCD +#define UART_SIG_PPS UART_SIG_DCD +#endif + /* UART_IOCTL() requests */ #define UART_IOCTL_BREAK 1 #define UART_IOCTL_IFLOW 2 @@ -133,6 +147,9 @@ struct uart_softc { int sc_txdatasz; int sc_txfifosz; /* Size of TX FIFO and buffer. */ + /* Pulse capturing support (PPS). */ + struct pps_state sc_pps; + /* Upper layer data. */ void *sc_softih; uint32_t sc_ttypend; |