Skip to content

feat(hal): add multiple register definitions (SYSCFG, XSPI, SID, SPI ENC, RTC)#13

Merged
luojia65 merged 6 commits into
rustsbi:mainfrom
NanaHigh:feat/hal
Jan 22, 2026
Merged

feat(hal): add multiple register definitions (SYSCFG, XSPI, SID, SPI ENC, RTC)#13
luojia65 merged 6 commits into
rustsbi:mainfrom
NanaHigh:feat/hal

Conversation

@NanaHigh

Copy link
Copy Markdown
Member
  • Add SYSCFG, XSPI, SID, SPI ENC, and RTC register definitions and implementations
  • Fix naming issues and add missing test cases
  • Fix code issues related to panic

- Fix some code issues related to panic.

Signed-off-by: Chongbing Yu <nanahigh@openatom.club>
Signed-off-by: Chongbing Yu <nanahigh@openatom.club>
Signed-off-by: Chongbing Yu <nanahigh@openatom.club>
@NanaHigh NanaHigh requested a review from luojia65 January 22, 2026 07:02

@luojia65 luojia65 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM with minor suggestions. Nice job!

Comment thread artinchip-hal/src/qspi/register.rs Outdated
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum CsPolarity {
pub enum CsPol {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we reuse embedded-hal::spi::Polarity and embedded-hal::spi::Phase for CsPol, Cpol and Cpha?

/// Bit-mode CS polarity.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum BMCsPolarity {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reuse Polarity structure?

Comment thread artinchip-hal/src/sys_cfg/register.rs Outdated
/// Compare voltage selection.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum CmpVoltageSel {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
pub enum CmpVoltageSel {
pub enum CmpVoltage {

Signed-off-by: Chongbing Yu <nanahigh@openatom.club>
Signed-off-by: Chongbing Yu <nanahigh@openatom.club>
Signed-off-by: Chongbing Yu <nanahigh@openatom.club>
@luojia65 luojia65 merged commit c782f14 into rustsbi:main Jan 22, 2026
15 checks passed
@NanaHigh NanaHigh deleted the feat/hal branch January 22, 2026 09:39
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