Skip to content

Commit 8c39a2f

Browse files
committed
fix(hal): add ccu initialization in uart new function
Signed-off-by: Zhouqi Jiang <[email protected]>
1 parent 0124999 commit 8c39a2f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

examples/nezha-d1/src/bin/uart.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ use allwinner_rt::{Clocks, Peripherals, entry};
66

77
#[entry]
88
fn main(p: Peripherals, c: Clocks) {
9+
// TODO make it clean
10+
unsafe {
11+
p.ccu
12+
.uart_bgr
13+
.modify(|v| v.gate_pass::<0>().deassert_reset::<0>())
14+
};
15+
916
let pads = (p.gpio.pb8, p.gpio.pb9);
1017
let mut serial = p.uart0.serial(pads, Config::default(), &c);
1118

0 commit comments

Comments
 (0)