Skip to content

Commit

Permalink
Remove unnecessary embedded-hal dependencies from BSPs (#519)
Browse files Browse the repository at this point in the history
Our HAL already re-exports embedded-hal, so there is no need to duplicate the dependency in every BSP. Also, updated edgebadge/pybadge to not export themselves as hal
  • Loading branch information
TDHolmes authored Oct 17, 2021
1 parent 62801ca commit 9495af9
Show file tree
Hide file tree
Showing 107 changed files with 85 additions and 89 deletions.
1 change: 1 addition & 0 deletions boards/arduino_mkr1000/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Unreleased

- remove extraneous `embedded-hal` dependencies from BSPs
- move `usbd-x` crates used only in examples to `[dev-dependencies]`
- removed unnecessary dependency on `nb` (#510)

Expand Down
1 change: 0 additions & 1 deletion boards/arduino_mkr1000/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ edition = "2018"

[dependencies]
cortex-m = "0.6"
embedded-hal = "0.2.3"

[dependencies.cortex-m-rt]
version = "0.6.12"
Expand Down
1 change: 1 addition & 0 deletions boards/arduino_mkrvidor4000/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Unreleased

- remove extraneous `embedded-hal` dependencies from BSPs
- removed unnecessary dependency on `nb` (#510)

---
Expand Down
1 change: 0 additions & 1 deletion boards/arduino_mkrvidor4000/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ edition = "2018"

[dependencies]
cortex-m = "0.6"
embedded-hal = "0.2.3"

[dependencies.cortex-m-rt]
version = "0.6.12"
Expand Down
1 change: 1 addition & 0 deletions boards/arduino_mkrzero/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Unreleased

- remove extraneous `embedded-hal` dependencies from BSPs
- move `usbd-x` crates used only in examples to `[dev-dependencies]`
- removed unnecessary dependency on `nb` (#510)

Expand Down
1 change: 0 additions & 1 deletion boards/arduino_mkrzero/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ edition = "2018"

[dependencies]
cortex-m = "0.6"
embedded-hal = "0.2.3"

[dependencies.cortex-m-rt]
version = "0.6.12"
Expand Down
1 change: 1 addition & 0 deletions boards/arduino_nano33iot/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased

- remove extraneous `embedded-hal` dependencies from BSPs
* move `usbd-x` crates used only in examples to `[dev-dependencies]`
* removed unnecessary dependency on `nb` (#510)

Expand Down
1 change: 0 additions & 1 deletion boards/arduino_nano33iot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ edition = "2018"

[dependencies]
cortex-m = "0.7"
embedded-hal = "0.2.3"

[dependencies.cortex-m-rt]
version = "0.6.12"
Expand Down
2 changes: 1 addition & 1 deletion boards/arduino_nano33iot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
pub use cortex_m_rt::entry;

pub use atsamd_hal as hal;
pub use embedded_hal as ehal;
pub use hal::ehal;
pub use hal::pac;

use hal::clock::GenericClockController;
Expand Down
1 change: 1 addition & 0 deletions boards/atsame54_xpro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Unreleased

- remove extraneous `embedded-hal` dependencies from BSPs
- move `usbd-x` crates used only in examples to `[dev-dependencies]`
- removed unnecessary dependency on `nb` and `panic_rtt` (#510)

Expand Down
1 change: 0 additions & 1 deletion boards/atsame54_xpro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ readme = "README.md"

[dependencies]
cortex-m = "0.6"
embedded-hal = "0.2.3"

[dependencies.cortex-m-rt]
version = "0.6.12"
Expand Down
1 change: 1 addition & 0 deletions boards/circuit_playground_express/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Unreleased

- remove extraneous `embedded-hal` dependencies from BSPs
- removed unnecessary dependency on `nb` (#510)

---
Expand Down
1 change: 0 additions & 1 deletion boards/circuit_playground_express/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ edition = "2018"

[dependencies]
cortex-m = "0.6"
embedded-hal = "0.2.3"

[dependencies.atsamd-hal]
version = "0.13"
Expand Down
1 change: 1 addition & 0 deletions boards/edgebadge/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Unreleased

- remove extraneous `embedded-hal` dependencies from BSPs
- move `usbd-x` crates used only in examples to `[dev-dependencies]`
- removed unnecessary dependency on `nb` (#510)

Expand Down
1 change: 0 additions & 1 deletion boards/edgebadge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ exclude = ["assets"]

[dependencies]
cortex-m = "0.6"
embedded-hal = "0.2.3"
st7735-lcd = "0.8.1"
ws2812-timer-delay = "0.3"

Expand Down
2 changes: 1 addition & 1 deletion boards/edgebadge/examples/blinky_basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#![no_std]
#![no_main]

use edgebadge::{self as hal, entry, pac, Pins};
use edgebadge::{entry, hal, pac, Pins};
use panic_halt as _;

use hal::clock::GenericClockController;
Expand Down
2 changes: 1 addition & 1 deletion boards/edgebadge/examples/ferris_img.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#![no_std]
#![no_main]

use edgebadge::{self as hal, entry, pac, Pins};
use edgebadge::{entry, hal, pac, Pins};
use panic_halt as _;

use embedded_graphics::image::Image;
Expand Down
2 changes: 1 addition & 1 deletion boards/edgebadge/examples/neopixel_adc_battery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#![no_std]
#![no_main]

use edgebadge::{self as hal, entry, pac, Pins};
use edgebadge::{entry, hal, pac, Pins};
use panic_halt as _;

use hal::adc::Adc;
Expand Down
4 changes: 2 additions & 2 deletions boards/edgebadge/examples/neopixel_adc_light.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
#![no_std]
#![no_main]

use edgebadge::{self as hal, entry, pac, Pins};
use edgebadge::{entry, hal, pac, Pins};
use panic_halt as _;

use embedded_hal::digital::v1_compat::OldOutputPin;
use hal::adc::Adc;
use hal::ehal::digital::v1_compat::OldOutputPin;
use hal::prelude::*;
use hal::timer::SpinTimer;
use hal::{clock::GenericClockController, delay::Delay};
Expand Down
2 changes: 1 addition & 1 deletion boards/edgebadge/examples/neopixel_easing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#![no_std]
#![no_main]

use edgebadge::{self as hal, entry, pac, Pins};
use edgebadge::{entry, hal, pac, Pins};
use panic_halt as _;

use core::f32::consts::FRAC_PI_2;
Expand Down
2 changes: 1 addition & 1 deletion boards/edgebadge/examples/neopixel_rainbow_timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#![no_std]
#![no_main]

use edgebadge::{self as hal, entry, pac, Pins};
use edgebadge::{entry, hal, pac, Pins};
use panic_halt as _;

use hal::prelude::*;
Expand Down
2 changes: 1 addition & 1 deletion boards/edgebadge/examples/neopixel_tilt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#![no_std]
#![no_main]

use edgebadge::{self as hal, entry, pac, Pins};
use edgebadge::{entry, hal, pac, Pins};
use panic_halt as _;

use hal::prelude::*;
Expand Down
2 changes: 1 addition & 1 deletion boards/edgebadge/examples/usb_poll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#![no_std]
#![no_main]

use edgebadge::{self as hal, entry, pac, Pins};
use edgebadge::{entry, hal, pac, Pins};
use panic_halt as _;

use hal::clock::GenericClockController;
Expand Down
2 changes: 1 addition & 1 deletion boards/edgebadge/examples/usb_serial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
//! Note leds may appear white during debug. Either build for release or add
//! opt-level = 2 to profile.dev in Cargo.toml
use edgebadge::{self as hal, entry, pac, Pins};
use edgebadge::{entry, hal, pac, Pins};
use panic_halt as _;

use cortex_m::interrupt::free as disable_interrupts;
Expand Down
3 changes: 1 addition & 2 deletions boards/edgebadge/src/pins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
use super::{hal, pac};

use embedded_hal::{digital::v1_compat::OldOutputPin, timer::CountDown, timer::Periodic};
use gpio::{Floating, Input, Output, Port, PushPull};
use hal::clock::GenericClockController;
use hal::define_pins;
use hal::ehal::{digital::v1_compat::OldOutputPin, spi, timer::CountDown, timer::Periodic};
use hal::gpio::{self, *};
use hal::hal::spi;
use hal::prelude::*;
use hal::sercom::{I2CMaster2, PadPin, SPIMaster1, SPIMaster4, UART5};
use hal::time::Hertz;
Expand Down
1 change: 1 addition & 0 deletions boards/feather_m0/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Unreleased

- remove extraneous `embedded-hal` dependencies from BSPs
* move `usbd-x` crates used only in examples to `[dev-dependencies]`
* removed unnecessary dependency on `nb` and `panic_rtt` (#510)
* Bump `cortex-m`/`cortex-m-rt` dependencies to fix a build issue
Expand Down
1 change: 0 additions & 1 deletion boards/feather_m0/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ resolver = "2"

[dependencies]
cortex-m = "0.7"
embedded-hal = "0.2.3"

[dependencies.cortex-m-rt]
version = "0.7"
Expand Down
2 changes: 1 addition & 1 deletion boards/feather_m0/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
pub use cortex_m_rt::entry;

pub use atsamd_hal as hal;
pub use embedded_hal as ehal;
pub use hal::ehal;
pub use hal::pac;

use hal::clock::GenericClockController;
Expand Down
1 change: 1 addition & 0 deletions boards/feather_m4/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Unreleased

- remove extraneous `embedded-hal` dependencies from BSPs
- move `usbd-x` crates used only in examples to `[dev-dependencies]`
- removed unnecessary dependency on `nb` (#510)

Expand Down
1 change: 0 additions & 1 deletion boards/feather_m4/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ documentation = "https://atsamd-rs.github.io/atsamd/atsamd51j/feather_m4/"

[dependencies]
cortex-m = "0.7"
embedded-hal = "0.2.3"

[dependencies.cortex-m-rt]
version = "0.7"
Expand Down
2 changes: 1 addition & 1 deletion boards/feather_m4/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use cortex_m_rt;
pub use cortex_m_rt::entry;

pub use atsamd_hal as hal;
pub use embedded_hal as ehal;
pub use hal::ehal;
pub use hal::pac;

use hal::clock::GenericClockController;
Expand Down
1 change: 1 addition & 0 deletions boards/gemma_m0/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Unreleased

- remove extraneous `embedded-hal` dependencies from BSPs
- removed unnecessary dependency on `nb` (#510)

---
Expand Down
1 change: 0 additions & 1 deletion boards/gemma_m0/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ edition = "2018"

[dependencies]
cortex-m = "0.6"
embedded-hal = "0.2.3"

[dependencies.cortex-m-rt]
version = "0.6.12"
Expand Down
1 change: 1 addition & 0 deletions boards/grand_central_m4/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Unreleased

- remove extraneous `embedded-hal` dependencies from BSPs
- move `usbd-x` crates used only in examples to `[dev-dependencies]`
- removed unnecessary dependency on `nb` and `panic_rtt` (#510)

Expand Down
1 change: 0 additions & 1 deletion boards/grand_central_m4/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ readme = "README.md"

[dependencies]
cortex-m = "0.6"
embedded-hal = "0.2.3"
ws2812-timer-delay = "0.3"

[dependencies.cortex-m-rt]
Expand Down
4 changes: 2 additions & 2 deletions boards/grand_central_m4/src/pins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use hal::sercom::{
};
use hal::time::Hertz;

use embedded_hal::{digital::v1_compat::OldOutputPin, timer::CountDown, timer::Periodic};
use hal::ehal::{digital::v1_compat::OldOutputPin, timer::CountDown, timer::Periodic};
use ws2812_timer_delay as ws2812;

use hal::clock::GenericClockController;
Expand Down Expand Up @@ -792,7 +792,7 @@ impl Neopixel {
port: &mut Port,
) -> ws2812::Ws2812<
T,
embedded_hal::digital::v1_compat::OldOutputPin<
hal::ehal::digital::v1_compat::OldOutputPin<
atsamd_hal::common::gpio::Pc24<
atsamd_hal::common::gpio::Output<atsamd_hal::common::gpio::PushPull>,
>,
Expand Down
1 change: 1 addition & 0 deletions boards/itsybitsy_m0/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Unreleased

- remove extraneous `embedded-hal` dependencies from BSPs
- move `usbd-x` crates used only in examples to `[dev-dependencies]`
- removed unnecessary dependency on `nb` (#510)

Expand Down
1 change: 0 additions & 1 deletion boards/itsybitsy_m0/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ readme = "README.md"

[dependencies]
cortex-m = "0.6"
embedded-hal = "0.2.3"
bitbang-hal = "0.3"
apa102-spi = "0.3"
smart-leds = "0.3"
Expand Down
2 changes: 1 addition & 1 deletion boards/itsybitsy_m0/src/pins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use super::{hal, pac};

#[cfg(feature = "unproven")]
use embedded_hal::timer::{CountDown, Periodic};
use hal::ehal::timer::{CountDown, Periodic};

use hal::clock::GenericClockController;
use hal::define_pins;
Expand Down
1 change: 1 addition & 0 deletions boards/itsybitsy_m4/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Unreleased

- remove extraneous `embedded-hal` dependencies from BSPs
- move `usbd-x` crates used only in examples to `[dev-dependencies]`
- removed unnecessary dependency on `nb` and `panic_rtt` (#510)

Expand Down
1 change: 0 additions & 1 deletion boards/itsybitsy_m4/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ readme = "README.md"

[dependencies]
cortex-m = "0.6"
embedded-hal = "0.2.3"
bitbang-hal = "0.3"
apa102-spi = "0.3"
smart-leds = "0.3"
Expand Down
2 changes: 1 addition & 1 deletion boards/itsybitsy_m4/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ pub use hal::samd51::*;
pub use cortex_m_rt::entry;
pub use pins::Pins;

use embedded_hal::timer::{CountDown, Periodic};
use gpio::{PfC, Port};
use hal::clock::GenericClockController;
use hal::ehal::timer::{CountDown, Periodic};
use hal::gpio::*;
use hal::sercom::{I2CMaster2, SPIMaster1, UART3};
use hal::time::Hertz;
Expand Down
2 changes: 1 addition & 1 deletion boards/itsybitsy_m4/src/pins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
use super::{hal, pac, pac::MCLK, pac::SERCOM1, pac::SERCOM2, pac::SERCOM3};

use embedded_hal::timer::{CountDown, Periodic};
use hal::define_pins;
use hal::ehal::timer::{CountDown, Periodic};
use hal::gpio::{self, *};
use hal::sercom::{I2CMaster2, PadPin, SPIMaster1, Sercom2Pad0, Sercom2Pad1, UART3};
use hal::time::Hertz;
Expand Down
1 change: 1 addition & 0 deletions boards/metro_m0/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Unreleased

- remove extraneous `embedded-hal` dependencies from BSPs
* move `usbd-x` crates used only in examples to `[dev-dependencies]`
* removed unnecessary dependency on `nb` and `panic_rtt` (#510)

Expand Down
1 change: 0 additions & 1 deletion boards/metro_m0/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ edition = "2018"

[dependencies]
cortex-m = "0.7"
embedded-hal = "0.2.3"

[dependencies.cortex-m-rt]
version = "0.7"
Expand Down
2 changes: 1 addition & 1 deletion boards/metro_m0/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
pub use cortex_m_rt::entry;

pub use atsamd_hal as hal;
pub use embedded_hal as ehal;
pub use hal::ehal;
pub use hal::pac;

use hal::clock::GenericClockController;
Expand Down
Loading

0 comments on commit 9495af9

Please sign in to comment.