Skip to content

Commit edb6702

Browse files
committed
rx add offset
1 parent 874b809 commit edb6702

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.10"
3+
version = "0.2.11"
44
edition = "2024"
55
authors = ["周睿 <zrufo747@outlook.com>"]
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
@@ -181,6 +181,10 @@ impl Receiver {
181181
(self.op.can_get)(self.uart)
182182
}
183183

184+
pub fn mmio_base_add(&mut self, offset: usize) {
185+
self.uart.base += offset;
186+
}
187+
184188
/// Read a byte from the UART.
185189
///
186190
/// # Safety

0 commit comments

Comments
 (0)