Skip to content

Commit a456481

Browse files
committed
add offset
1 parent c42fd96 commit a456481

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

any-uart/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "any-uart"
3-
version = "0.2.2"
3+
version = "0.2.3"
44
edition = "2024"
55
authors = ["周睿 <[email protected]>"]
66
description = "Init early console from device tree, mostly for Arm"

any-uart/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ impl Uart {
4747
}
4848
}
4949

50+
pub fn mmio_base_add(&mut self, offset: usize) {
51+
self.data.base += offset;
52+
}
53+
5054
pub fn new_by_fdt_node(node: &Node<'_>, f: FnPhysToVirt) -> Option<Self> {
5155
let reg = node.reg()?.next()?;
5256

0 commit comments

Comments
 (0)