Skip to content

Commit 63fa7c2

Browse files
authored
Merge pull request #151 from BartMassey-upstream/i2c-pins-pub
made sda and scl public for i2c interfaces
2 parents 736cbbb + f3e705e commit 63fa7c2

File tree

5 files changed

+16
-9
lines changed

5 files changed

+16
-9
lines changed

Diff for: CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8-
## [Unreleased]
8+
## [0.15.1] - 2024-07-30
99

1010
- Set MSRV for `microbit` and `microbit-v2` crates.
1111
- Bumped MSRV to 1.79.0.
12+
- Make various `I2C` `Pin` fields `pub`
1213

1314
## [0.15.0] - 2024-06-19
1415

Diff for: microbit-common/src/v1/board.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,10 @@ pub struct Buttons {
350350

351351
/// I2C shared internal and external bus pins
352352
pub struct I2CPins {
353-
scl: SCL,
354-
sda: SDA,
353+
/// I2C control pin
354+
pub scl: SCL,
355+
/// I2C data pin
356+
pub sda: SDA,
355357
}
356358

357359
impl From<I2CPins> for twi::Pins {

Diff for: microbit-common/src/v2/board.rs

+8-4
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,10 @@ pub struct Buttons {
438438

439439
/// I2C internal bus pins
440440
pub struct I2CInternalPins {
441-
scl: INT_SCL,
442-
sda: INT_SDA,
441+
/// Internal I2C clock pin
442+
pub scl: INT_SCL,
443+
/// Internal I2C data pin
444+
pub sda: INT_SDA,
443445
}
444446

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

463465
/// I2C external bus pins
464466
pub struct I2CExternalPins {
465-
scl: SCL,
466-
sda: SDA,
467+
/// External I2C clock pin
468+
pub scl: SCL,
469+
/// External I2C data pin
470+
pub sda: SDA,
467471
}
468472

469473
impl From<I2CExternalPins> for twim::Pins {

Diff for: microbit-v2/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "microbit-v2"
3-
version = "0.15.0"
3+
version = "0.15.1"
44
description = "Board support crate for the BBC Micro:bit V2"
55
edition = "2018"
66
readme = "../README.md"

Diff for: microbit/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "microbit"
3-
version = "0.15.0"
3+
version = "0.15.1"
44
description = "Board support crate for the BBC Micro:bit V1"
55
edition = "2018"
66
readme = "../README.md"

0 commit comments

Comments
 (0)