FreeBSD/sys/dev/wbwd/wbwd.c
/*
 * Return the watchdog related registers as we last read them.  This will
 * usually not give the current timeout or state on whether the watchdog
 * fired.
 */
Return the watchdog related registers as we last read them.  This will
usually not give the current timeout or state on whether the watchdog
fired.
Return the watchdog related registers as we last read them . This will usually not give the current timeout or state on whether the watchdog fired .
static int
sysctl_wb_debug(SYSCTL_HANDLER_ARGS)
{
	struct wb_softc *sc;
	struct sbuf sb;
	int error;
	sc = arg1;
	sbuf_new_for_sysctl(&sb, NULL, 64, req);
	sbuf_printf(&sb, "LDN8 (GPIO2, Watchdog): ");
	sbuf_printf(&sb, "CR%02X 0x%02x ", sc->ctl_reg, sc->reg_1);
	sbuf_printf(&sb, "CR%02X 0x%02x ", sc->time_reg, sc->reg_timeout);
	sbuf_printf(&sb, "CR%02X 0x%02x", sc->csr_reg, sc->reg_2);
	error = sbuf_finish(&sb);
	sbuf_delete(&sb);
	return (error);
}
static int sysctl_wb_debug ( SYSCTL_HANDLER_ARGS ) { struct wb_softc * sc ; struct sbuf sb ; int error ; sc = arg1 ; sbuf_new_for_sysctl ( & sb , NULL , 64 , req ) ; sbuf_printf ( & sb , " " ) ; sbuf_printf ( & sb , " " , sc -> ctl_reg , sc -> reg_1 ) ; sbuf_printf ( & sb , " " , sc -> time_reg , sc -> reg_timeout ) ; sbuf_printf ( & sb , " " , sc -> csr_reg , sc -> reg_2 ) ; error = sbuf_finish ( & sb ) ; sbuf_delete ( & sb ) ; return ( error ) ; }
Return the watchdog related registers as we last read them.
Return the watchdog related registers as we last read them .