diff --git a/Cargo.lock b/Cargo.lock index bc3f93f..16d81fe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -93,6 +93,16 @@ dependencies = [ "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]] name = "embedded-hal" version = "0.2.7" @@ -217,16 +227,6 @@ dependencies = [ "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]] name = "typenum" version = "1.15.0" diff --git a/Cargo.toml b/Cargo.toml index 05cc8bf..20ce681 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,9 +1,8 @@ [package] authors = ["J / Jacob Babich "] edition = "2018" -readme = "README.md" -name = "test-cortex-m4-rust" -version = "0.1.0" +name = "driver-and-task-library" +version = "4.14.0" [dependencies] cortex-m = "0.6.0" @@ -11,25 +10,12 @@ cortex-m-rt = "0.6.10" cortex-m-semihosting = "0.3.3" 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] path = "src/lib/mod.rs" -# this lets you use `cargo fix`! [[bin]] -name = "test-cortex-m4-rust" +name = "program" +path = "src/main.rs" test = false bench = false diff --git a/README.md b/README.md new file mode 100644 index 0000000..536601c --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# TODO: Write README diff --git a/src/main.rs b/src/main.rs index 581302d..2f4fe30 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,7 +4,7 @@ use panic_halt as _; // you can put a breakpoint on `rust_begin_unwind` to catch panics 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, }; @@ -44,9 +44,9 @@ fn main() -> ! { loop { match switches.read_all() { [L, L] => rgb_led.write_all(white), - [L, H] => rgb_led.write_all(red), - [H, L] => rgb_led.write_all(green), - [H, H] => rgb_led.write_all(blue), + [L, H] => rgb_led.write_all(blue), + [H, L] => rgb_led.write_all(red), + [H, H] => rgb_led.write_all(green), } } }