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 Aug 2, 2024
1 parent 736cbbb commit f3e705e
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 f3e705e

Please sign in to comment.