Skip to content

feat(hal): implement I2C instance#12

Merged
luojia65 merged 1 commit into
rustsbi:mainfrom
NanaHigh:feat/hal
Jan 10, 2026
Merged

feat(hal): implement I2C instance#12
luojia65 merged 1 commit into
rustsbi:mainfrom
NanaHigh:feat/hal

Conversation

@NanaHigh

@NanaHigh NanaHigh commented Jan 9, 2026

Copy link
Copy Markdown
Member
  • Add new example pbp-i2c-master.
  • Fix code and doc issues.

Tested on kunlunpi board v1.1
mmexport1767970211590
1000142227_小萌GIF_20260109_225226

@NanaHigh NanaHigh requested a review from luojia65 January 9, 2026 15:00
@NanaHigh NanaHigh force-pushed the feat/hal branch 4 times, most recently from 43ed6e2 to 11e58c6 Compare January 10, 2026 06:14

@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 small improvements that can be applied.

Comment thread artinchip-hal/src/i2c/pad.rs Outdated
@@ -0,0 +1,5 @@
//! I2C pad.

pub trait I2CPad<const I: u8> {}

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 trait I2CPad<const I: u8> {}
pub trait I2cPad<const I: u8> {}

Comment thread examples/pbp/pbp-i2c-master/src/main.rs Outdated
let mut uart0 = p.uart0.new_blocking(
tx,
rx,
UartConfig {

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.

Can we make UartConfig::default being 115200 8N1?

- Add new example `pbp-hello-world`.
- Fix code and doc issues.

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