pub fn set_error_warning_limit(&mut self, limit: u8) {
        self.regs()
            .err_warning_limit()
            .write(|w| unsafe { w.err_warning_limit().bits(limit) });
    }
Set the error warning threshold.

In the case when any of an error counter value exceeds the threshold, or
all the error counter values are below the threshold, an error
warning interrupt will be triggered (given the enable signal is
valid).
esp-hal/src/twai/mod.rs