Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to embedded-hal 1.0 release #51

Merged
merged 1 commit into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ description = "HAL for the bl602 microcontroller"

[dependencies]
bl602-pac = { git = "https://github.com/sipeed/bl602-pac", branch = "main" }
embedded-hal = "=1.0.0-rc.3"
embedded-hal-nb = "=1.0.0-rc.3"
embedded-hal = "1"
embedded-hal-nb = "1"
embedded-time = "0.12.0"
riscv = "0.10.1"
nb = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion src/delay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub struct McycleDelay {
impl McycleDelay {
/// Constructs the delay provider based on core clock frequency `freq`
pub fn new(freq: u32) -> Self {
Self {
Self {
core_frequency: freq,
}
}
Expand Down
13 changes: 1 addition & 12 deletions src/gpio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ macro_rules! impl_glb {
pub mod pin {
use core::marker::PhantomData;
use core::convert::Infallible;
use embedded_hal::digital::{InputPin, OutputPin, StatefulOutputPin, ToggleableOutputPin};
use embedded_hal::digital::{InputPin, OutputPin, StatefulOutputPin};
use embedded_hal_zero::digital::v2::{
InputPin as InputPinZero,
OutputPin as OutputPinZero,
Expand Down Expand Up @@ -590,17 +590,6 @@ macro_rules! impl_glb {
}


impl<MODE> ToggleableOutputPin for $Pini<Output<MODE>> {
fn toggle(&mut self) -> Result<(), Self::Error> {
if self.is_output_high_inner() {
self.set_low_inner()
} else {
self.set_high_inner()
}
Ok(())
}
}

impl<MODE> ToggleableOutputPinZero for $Pini<Output<MODE>> {
type Error = Infallible;

Expand Down
Loading