renaming cleanup
This commit is contained in:
20
Cargo.lock
generated
20
Cargo.lock
generated
@@ -93,6 +93,16 @@ dependencies = [
|
|||||||
"cortex-m 0.7.4",
|
"cortex-m 0.7.4",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "driver-and-task-library"
|
||||||
|
version = "4.14.0"
|
||||||
|
dependencies = [
|
||||||
|
"cortex-m 0.6.7",
|
||||||
|
"cortex-m-rt",
|
||||||
|
"cortex-m-semihosting",
|
||||||
|
"panic-halt",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "embedded-hal"
|
name = "embedded-hal"
|
||||||
version = "0.2.7"
|
version = "0.2.7"
|
||||||
@@ -217,16 +227,6 @@ dependencies = [
|
|||||||
"unicode-xid",
|
"unicode-xid",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "test-cortex-m4-rust"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"cortex-m 0.6.7",
|
|
||||||
"cortex-m-rt",
|
|
||||||
"cortex-m-semihosting",
|
|
||||||
"panic-halt",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "typenum"
|
name = "typenum"
|
||||||
version = "1.15.0"
|
version = "1.15.0"
|
||||||
|
22
Cargo.toml
22
Cargo.toml
@@ -1,9 +1,8 @@
|
|||||||
[package]
|
[package]
|
||||||
authors = ["J / Jacob Babich <jacobbabichpublic+git@gmail.com>"]
|
authors = ["J / Jacob Babich <jacobbabichpublic+git@gmail.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
readme = "README.md"
|
name = "driver-and-task-library"
|
||||||
name = "test-cortex-m4-rust"
|
version = "4.14.0"
|
||||||
version = "0.1.0"
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
cortex-m = "0.6.0"
|
cortex-m = "0.6.0"
|
||||||
@@ -11,25 +10,12 @@ cortex-m-rt = "0.6.10"
|
|||||||
cortex-m-semihosting = "0.3.3"
|
cortex-m-semihosting = "0.3.3"
|
||||||
panic-halt = "0.2.0"
|
panic-halt = "0.2.0"
|
||||||
|
|
||||||
# Uncomment for the panic example.
|
|
||||||
# panic-itm = "0.4.1"
|
|
||||||
|
|
||||||
# Uncomment for the allocator example.
|
|
||||||
# alloc-cortex-m = "0.4.0"
|
|
||||||
|
|
||||||
# Uncomment for the device example.
|
|
||||||
# Update `memory.x`, set target to `thumbv7em-none-eabihf` in `.cargo/config`,
|
|
||||||
# and then use `cargo build --examples device` to build it.
|
|
||||||
# [dependencies.stm32f3]
|
|
||||||
# features = ["stm32f303", "rt"]
|
|
||||||
# version = "0.7.1"
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
path = "src/lib/mod.rs"
|
path = "src/lib/mod.rs"
|
||||||
|
|
||||||
# this lets you use `cargo fix`!
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "test-cortex-m4-rust"
|
name = "program"
|
||||||
|
path = "src/main.rs"
|
||||||
test = false
|
test = false
|
||||||
bench = false
|
bench = false
|
||||||
|
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
use panic_halt as _; // you can put a breakpoint on `rust_begin_unwind` to catch panics
|
use panic_halt as _; // you can put a breakpoint on `rust_begin_unwind` to catch panics
|
||||||
|
|
||||||
use cortex_m_rt::entry;
|
use cortex_m_rt::entry;
|
||||||
use test_cortex_m4_rust::{
|
use driver_and_task_library::{
|
||||||
setup_board, Function, Pin, Port, PortOptions, ReadablePinOptions, WritablePinOptions, H, L,
|
setup_board, Function, Pin, Port, PortOptions, ReadablePinOptions, WritablePinOptions, H, L,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -44,9 +44,9 @@ fn main() -> ! {
|
|||||||
loop {
|
loop {
|
||||||
match switches.read_all() {
|
match switches.read_all() {
|
||||||
[L, L] => rgb_led.write_all(white),
|
[L, L] => rgb_led.write_all(white),
|
||||||
[L, H] => rgb_led.write_all(red),
|
[L, H] => rgb_led.write_all(blue),
|
||||||
[H, L] => rgb_led.write_all(green),
|
[H, L] => rgb_led.write_all(red),
|
||||||
[H, H] => rgb_led.write_all(blue),
|
[H, H] => rgb_led.write_all(green),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user