renaming cleanup

This commit is contained in:
J / Jacob Babich
2022-04-14 19:22:23 -04:00
parent 790a9d97ad
commit 452cdfed9f
4 changed files with 19 additions and 32 deletions

20
Cargo.lock generated
View File

@@ -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"

View File

@@ -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

1
README.md Normal file
View File

@@ -0,0 +1 @@
# TODO: Write README

View File

@@ -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),
} }
} }
} }