Skip to content

Commit

Permalink
made sda and scl public for i2c interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
BartMassey committed Jul 30, 2024
1 parent c0ff720 commit 79186f9
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

(no changes)

## [0.15.1] - 2024-07-30

- Make various `I2C` `Pin` fields `pub`

## [0.15.0] - 2024-06-19

- Update HAL crates to 0.18.0.
Expand Down
6 changes: 4 additions & 2 deletions microbit-common/src/v1/board.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,10 @@ pub struct Buttons {

/// I2C shared internal and external bus pins
pub struct I2CPins {
scl: SCL,
sda: SDA,
/// I2C control pin
pub scl: SCL,
/// I2C data pin
pub sda: SDA,
}

impl From<I2CPins> for twi::Pins {
Expand Down
12 changes: 8 additions & 4 deletions microbit-common/src/v2/board.rs
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,10 @@ pub struct Buttons {

/// I2C internal bus pins
pub struct I2CInternalPins {
scl: INT_SCL,
sda: INT_SDA,
/// Internal I2C clock pin
pub scl: INT_SCL,
/// Internal I2C data pin
pub sda: INT_SDA,
}

impl From<I2CInternalPins> for twim::Pins {
Expand All @@ -462,8 +464,10 @@ impl From<I2CInternalPins> for twis::Pins {

/// I2C external bus pins
pub struct I2CExternalPins {
scl: SCL,
sda: SDA,
/// External I2C clock pin
pub scl: SCL,
/// External I2C data pin
pub sda: SDA,
}

impl From<I2CExternalPins> for twim::Pins {
Expand Down
2 changes: 1 addition & 1 deletion microbit-v2/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "microbit-v2"
version = "0.15.0"
version = "0.15.1"
description = "Board support crate for the BBC Micro:bit V2"
edition = "2018"
readme = "../README.md"
Expand Down
2 changes: 1 addition & 1 deletion microbit/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "microbit"
version = "0.15.0"
version = "0.15.1"
description = "Board support crate for the BBC Micro:bit V1"
edition = "2018"
readme = "../README.md"
Expand Down

0 comments on commit 79186f9

Please sign in to comment.