Skip to content

Commit

Permalink
Add embedded::hal::digital::ToggleableOutputPin
Browse files Browse the repository at this point in the history
  • Loading branch information
niclashoyer committed Feb 5, 2021
1 parent da6a7d0 commit beb849c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.3.0] - 2021-02-05
- Add implementation of `embedded_hal::digital::ToggleableOutputPin`

## [0.2.0] - 2021-02-01
### Added
- Add implementation of `embedded_hal::digital::StatefulOutputPin`
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "embedded-hal-sync-pins"
version = "0.2.0"
version = "0.3.0"
authors = ["Niclas Hoyer <info@niclashoyer.de>"]
edition = "2018"
description = "embedded-hal pin implementations that can be shared between threads"
Expand Down
4 changes: 4 additions & 0 deletions src/pins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ impl hal::StatefulOutputPin for PushPullPin {
}
}

impl hal::toggleable::Default for PushPullPin {}

impl hal::InputPin for PushPullPin {
type Error = Infallible;

Expand Down Expand Up @@ -256,6 +258,8 @@ impl hal::StatefulOutputPin for OpenDrainPin {
}
}

impl hal::toggleable::Default for OpenDrainPin {}

impl hal::InputPin for OpenDrainPin {
type Error = Infallible;

Expand Down

0 comments on commit beb849c

Please sign in to comment.