Skip to content

Conversation

@woshiluo
Copy link
Member

This pull request add uart_sifive crate for sifive,uart0 deivce.

Folloed by manual which is metioned in README file.

Have a simple test on qemu sifive_u device:

image

Signed-off-by: Woshiluo Luo <woshiluo.luo@outlook.com>
const TXWM = 0b01;
}

// struct DivRegister: u32 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个寄存器还没调通?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bitflags 不太支持单个二进制位作为 flag,但是这里保留了每个寄存器的结构用以注释。

实现的话,由于这个寄存器事实上也只用来存放除数,所以需要设置的时候直接调用 set_div 函数即可。

@duskmoon314
Copy link
Member

后面有些函数的注释可能考虑加一下

@duskmoon314 duskmoon314 merged commit 2a118b3 into rustsbi:main May 28, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants