tinyboot-ch32-hal 0.3.0

Hardware abstraction layer for tinyboot on CH32 microcontrollers
Documentation
1
2
3
4
5
6
7
8
/// Feed the independent watchdog timer.
///
/// Writes the reload key (0xAAAA) to IWDG_CTLR. Safe to call even if
/// the watchdog is not enabled — the write is simply ignored.
pub fn feed() {
    const IWDG_CTLR: u32 = 0x4000_3000;
    unsafe { core::ptr::write_volatile(IWDG_CTLR as *mut u32, 0xAAAA) };
}