Skip to main content

ch32_hal/delay/
mod.rs

1// CH32H4 has its own systick layout (`systick_v3f_v5f`, dual-core), so
2// it gets a dedicated impl. The non-H4 cases stay gated on the qingke
3// core version because that's how the existing delay shims were
4// organised — `impl_qingke_v2_v4` covers `systick_rv2` and `systick_rv4`
5// in one file.
6#[cfg(systick_v3f_v5f)]
7#[path = "./impl_systick_v3f_v5f.rs"]
8mod delay_impl;
9
10#[cfg(all(any(qingke_v2, qingke_v4), not(systick_v3f_v5f)))]
11#[path = "./impl_qingke_v2_v4.rs"]
12mod delay_impl;
13
14#[cfg(systick_v4x7)]
15#[path = "./impl_systick_v4x7.rs"]
16mod delay_impl;
17
18#[cfg(all(qingke_v3, not(systick_v4x7)))]
19#[path = "./impl_qingke_v3.rs"]
20mod delay_impl;
21
22pub use delay_impl::*;
23
24pub unsafe fn init() {
25    Delay::init();
26}