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

Split out hal implementation to efm32hg-hal crate #23

Merged
merged 10 commits into from
Oct 23, 2019
Merged
Show file tree
Hide file tree
Changes from 2 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
17 changes: 14 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,20 @@ edition = "2018"

[dependencies]
cortex-m = "0.5.8"
efm32 = { git = "https://github.com/jacobrosenthal/efm32hg309f64-pac", features = ["rt"], package="efm32hg309f64-pac" }
tomu-macros = { path = "macros", optional = true }
embedded-hal = { version = "0.2.2", features = ["unproven"] }
cast = {version = "0.2.2",default-features=false }
embedded-hal = "0.2.2"
cast = {version = "0.2.2", default-features=false }

[dependencies.efm32]
git = "https://github.com/em32-rs/efm32hg-pac"
package = "efm32hg-pac"
features = ["rt"]

[dependencies.efm32-hal]
git = "https://github.com/fudanchii/efm32gg-hal"
branch = "efm32-hal/efm32hg-support"
package = "efm32gg-hal"
features = ["chip-efm32hg"]

# We don't have direct dependencies to this,
# but will need this to build examples
Expand All @@ -23,3 +33,4 @@ compiletest_rs = "0.3.17"

[features]
toboot-custom-config = ["tomu-macros"]
unproven = ["embedded-hal/unproven"]
15 changes: 10 additions & 5 deletions examples/blink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,20 @@ use tomu::{prelude::*, Tomu};
#[entry]
fn main() -> ! {
let mut tomu = Tomu::take().unwrap();
let mut timer = tomu.delay;
let red = tomu.led.red();
let mut red = tomu.leds.red;
let mut green = tomu.leds.green;
let mut delay = tomu.delay;

tomu.watchdog.disable();

loop {
red.off();
timer.delay_ms(1000_u32);
red.on();
timer.delay_ms(1000_u32);
delay.delay_ms(500u16);
green.on();
delay.delay_ms(500u16);
red.off();
delay.delay_ms(500u16);
green.off();
delay.delay_ms(500u16);
}
}
4 changes: 2 additions & 2 deletions examples/toboot_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ toboot_config! {
fn main() -> ! {
let mut tomu = Tomu::take().unwrap();

tomu.led.red().off();
tomu.led.green().on();
tomu.leds.red.off();
tomu.leds.green.on();

loop {
tomu.watchdog.feed();
Expand Down
47 changes: 0 additions & 47 deletions examples/touch_button.rs

This file was deleted.

62 changes: 0 additions & 62 deletions src/capacitive.rs

This file was deleted.

62 changes: 0 additions & 62 deletions src/clocks.rs

This file was deleted.

96 changes: 0 additions & 96 deletions src/delay.rs

This file was deleted.

Loading