MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / i6300esb_timer_stop

Function i6300esb_timer_stop

components/drivers/watchdog/watchdog-i6300esb.c:86–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86static rt_uint32_t i6300esb_timer_stop(struct i6300esb_wdt *esb)
87{
88 rt_uint8_t val;
89
90 /* First, reset timers as suggested by the docs */
91 i6300esb_wdt_unlock_registers(esb);
92 HWREG16(esb->regs + ESB_RELOAD_REG) = ESB_WDT_RELOAD;
93
94 /* Then disable the WDT */
95 rt_pci_write_config_u8(esb->pdev, ESB_LOCK_PCI_REG, 0x0);
96 rt_pci_read_config_u8(esb->pdev, ESB_LOCK_PCI_REG, &val);
97
98 /* Returns 0 if the timer was disabled, non-zero otherwise */
99 return val & ESB_WDT_ENABLE;
100}
101
102static rt_err_t esb_timer_keepalive(struct i6300esb_wdt *esb)
103{

Callers 2

i6300esb_wdt_controlFunction · 0.85
i6300esb_wdt_removeFunction · 0.85

Calls 3

rt_pci_write_config_u8Function · 0.85
rt_pci_read_config_u8Function · 0.85

Tested by

no test coverage detected