static inline void wdt_timeout_value(unsigned char new_timeout) { /* -- Watchdog Timer Time-out Value -- * Bit 0-7 Binary coded units (0=Disabled, 1..255) */ write_io_cr(0xF2, new_timeout); }
static inline void wdt_timer_ctrl(unsigned char reg) { /* -- Watchdog timer control -- <<<<<<< HEAD * Bit 0 Status Bit: 0 = Timer counting, 1 = Timeout occurred ======= * Bit 0 Status Bit: 0 = Timer counting, 1 = Timeout occured >>>>>>> 296c66da8a02d52243f45b80521febece5ed498a * Bit 1 Power LED Toggle: 0 = Disable Toggle, 1 = Toggle at 1 Hz * Bit 2 Force Timeout: 1 = Forces WD timeout event (self-cleaning) * Bit 3 P20 Force Timeout enabled: * 0 = P20 activity does not generate the WD timeout event * 1 = P20 Allows rising edge of P20, from the keyboard * controller, to force the WD timeout event. * Bit 4 (Reserved) * -- Soft power management -- * Bit 5 Stop Counter: 1 = Stop software power down counter * set via register 0xB8, (self-cleaning) * (Upon read: 0 = Counter running, 1 = Counter stopped) * Bit 6 Restart Counter: 1 = Restart software power down counter * set via register 0xB8, (self-cleaning) * Bit 7 SPOFF: 1 = Force software power down (self-cleaning) */ write_io_cr(0xF4, reg); }
static inline void wdt_timer_units(unsigned char new_units) { // -- Watchdog timer units -- // Bit 0-6 (Reserved) // Bit 7, WDT Time-out Value Units Select // (0 = Minutes, 1 = Seconds) write_io_cr(0xF1, new_units); }
static inline void gpio_bit13(unsigned char reg) { // -- General Purpose I/O Bit 1.3 -- // Bit 0, In/Out: 0 = Output, 1 = Input // Bit 1, Polarity: 0 = No Invert, 1 = Invert // Bit 2, Group Enable Intr.: 0 = Disable, 1 = Enable // Bit 3, Function select: 0 = GPI/O, 1 = LED // Bit 4-6 (Reserved) // Bit 7, Output Type: 0 = Push Pull Bit, 1 = Open Drain write_io_cr(0xE3, reg); }
static inline void wdt_timer_conf(unsigned char conf) { // -- Watchdog timer configuration -- // Bit 0 Joystick enable: 0* = No Reset, 1 = Reset WDT upon Gameport I/O // Bit 1 Keyboard enable: 0* = No Reset, 1 = Reset WDT upon KBD Intr. // Bit 2 Mouse enable: 0* = No Reset, 1 = Reset WDT upon Mouse Intr. // Bit 3 Reset the timer // (Wrong in SMsC documentation? Given as: PowerLED Timout Enabled) // Bit 4-7 WDT Interrupt Mapping: (0000* = Disabled, // 0001=IRQ1, 0010=(Invalid), 0011=IRQ3 to 1111=IRQ15) write_io_cr(0xF3, conf); }
static inline void gpio_bit12(unsigned char reg) { // -- General Purpose I/O Bit 1.2 -- // Bit 0, In/Out: 0 = Output, 1 = Input // Bit 1, Polarity: 0 = No Invert, 1 = Invert // Bit 2, Group Enable Intr.: 0 = Disable, 1 = Enable // Bit 3/4, Function select: 00 = GPI/O, 01 = WDT, 10 = P17, // 11 = Either Edge Triggered Intr. 2 // Bit 5/6 (Reserved) // Bit 7, Output Type: 0 = Push Pull Bit, 1 = Open Drain write_io_cr(0xE2, reg); }
static inline void wdt_timer_ctrl(unsigned char reg) { // -- Watchdog timer control -- // Bit 0 Status Bit: 0 = Timer counting, 1 = Timeout occured // Bit 1 Power LED Toggle: 0 = Disable Toggle, 1 = Toggle at 1 Hz // Bit 2 Force Timeout: 1 = Forces WD timeout event (self-cleaning) // Bit 3 P20 Force Timeout enabled: // 0 = P20 activity does not generate the WD timeout event // 1 = P20 Allows rising edge of P20, from the keyboard // controller, to force the WD timeout event. // Bit 4 (Reserved) // -- Soft power management -- // Bit 5 Stop Counter: 1 = Stop software power down counter // set via register 0xB8, (self-cleaning) // (Upon read: 0 = Counter running, 1 = Counter stopped) // Bit 6 Restart Counter: 1 = Restart software power down counter // set via register 0xB8, (self-cleaning) // Bit 7 SPOFF: 1 = Force software power down (self-cleaning) write_io_cr(0xF4, reg); }
static inline void wdt_timer_ctrl(unsigned char reg) { write_io_cr(0xF4, reg); }
static inline void wdt_timer_conf(unsigned char conf) { write_io_cr(0xF3, conf); }
static inline void wdt_timeout_value(unsigned char new_timeout) { write_io_cr(0xF2, new_timeout); }
static inline void wdt_timer_units(unsigned char new_units) { write_io_cr(0xF1, new_units); }
static inline void gpio_bit13(unsigned char reg) { write_io_cr(0xE3, reg); }