use embedded_hal through stm32f4xx_hal instead of direct dependency

this will aid maintainability.
This commit is contained in:
Astro 2020-03-21 00:22:38 +01:00
parent a102e5fcec
commit b345cc0865
4 changed files with 8 additions and 8 deletions

1
Cargo.lock generated
View File

@ -355,7 +355,6 @@ dependencies = [
"cortex-m", "cortex-m",
"cortex-m-log", "cortex-m-log",
"cortex-m-rt", "cortex-m-rt",
"embedded-hal",
"hash2hwaddr", "hash2hwaddr",
"log", "log",
"nom", "nom",

View File

@ -21,7 +21,6 @@ bare-metal = "0.2"
cortex-m = "0.6" cortex-m = "0.6"
cortex-m-rt = { version = "0.6", features = ["device"] } cortex-m-rt = { version = "0.6", features = ["device"] }
cortex-m-log = { version = "0.6", features = ["log-integration"] } cortex-m-log = { version = "0.6", features = ["log-integration"] }
embedded-hal = "0.2"
# TODO: pending https://github.com/stm32-rs/stm32f4xx-hal/pull/125 # TODO: pending https://github.com/stm32-rs/stm32f4xx-hal/pull/125
stm32f4xx-hal = { git = "https://github.com/thalesfragoso/stm32f4xx-hal", branch = "pwm-impl", features = ["rt", "stm32f427"] } stm32f4xx-hal = { git = "https://github.com/thalesfragoso/stm32f4xx-hal", branch = "pwm-impl", features = ["rt", "stm32f427"] }
stm32-eth = { version = "0.1.2", features = ["smoltcp-phy"], git = "https://github.com/stm32-rs/stm32-eth.git" } stm32-eth = { version = "0.1.2", features = ["smoltcp-phy"], git = "https://github.com/stm32-rs/stm32-eth.git" }

View File

@ -1,8 +1,8 @@
use embedded_hal::{ use stm32f4xx_hal::{
hal::{
blocking::spi::Transfer, blocking::spi::Transfer,
digital::v2::OutputPin, digital::v2::OutputPin,
}; },
use stm32f4xx_hal::{
time::MegaHertz, time::MegaHertz,
spi, spi,
}; };

View File

@ -1,7 +1,9 @@
use core::fmt; use core::fmt;
use embedded_hal::digital::v2::OutputPin;
use embedded_hal::blocking::spi::Transfer;
use log::{info, warn}; use log::{info, warn};
use stm32f4xx_hal::hal::{
blocking::spi::Transfer,
digital::v2::OutputPin,
};
use super::{ use super::{
regs::{self, Register, RegisterData}, regs::{self, Register, RegisterData},
checksum::{ChecksumMode, Checksum}, checksum::{ChecksumMode, Checksum},