rmk 0.9.0

Keyboard firmware written in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use super::WatchdogFeed;

/// ESP32 MWDT (Main Watchdog Timer) wrapper.
pub struct Esp32Watchdog<TG: esp_hal::timer::timg::TimerGroupInstance> {
    inner: esp_hal::timer::timg::Wdt<TG>,
}

impl<TG: esp_hal::timer::timg::TimerGroupInstance> Esp32Watchdog<TG> {
    pub fn new(wdt: esp_hal::timer::timg::Wdt<TG>) -> Self {
        Self { inner: wdt }
    }
}

impl<TG: esp_hal::timer::timg::TimerGroupInstance + Send> WatchdogFeed for Esp32Watchdog<TG> {
    fn feed(&mut self) {
        self.inner.feed();
    }
}