1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-23 11:18:54 +00:00

Fix UART PPS capture mode printing

* Add breaks to prevent fallthrough and printing of multiple modes.
* Only check the mode, mask out all other bits.
This commit is contained in:
Justin Hibbits 2016-08-28 04:40:27 +00:00
parent c401c72b48
commit 7bd8311dec
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=304940

View File

@ -97,15 +97,19 @@ uart_pps_print_mode(struct uart_softc *sc)
{
device_printf(sc->sc_dev, "PPS capture mode: ");
switch(sc->sc_pps_mode) {
switch(sc->sc_pps_mode & UART_PPS_SIGNAL_MASK) {
case UART_PPS_DISABLED:
printf("disabled");
break;
case UART_PPS_CTS:
printf("CTS");
break;
case UART_PPS_DCD:
printf("DCD");
break;
default:
printf("invalid");
break;
}
if (sc->sc_pps_mode & UART_PPS_INVERT_PULSE)
printf("-Inverted");