Skip to content

Commit

Permalink
Merge pull request #151 from BartMassey-upstream/i2c-pins-pub
Browse files Browse the repository at this point in the history
made sda and scl public for i2c interfaces
  • Loading branch information
qwandor authored Aug 2, 2024
2 parents 736cbbb + f3e705e commit 63fa7c2
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
## [0.15.1] - 2024-07-30

- Set MSRV for `microbit` and `microbit-v2` crates.
- Bumped MSRV to 1.79.0.
- Make various `I2C` `Pin` fields `pub`

## [0.15.0] - 2024-06-19

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 63fa7c2

Please sign in to comment.