From b2c4ee62884d1361ab74f52bc81721dcc8f6d557 Mon Sep 17 00:00:00 2001 From: Guillaume Pinot Date: Wed, 5 Aug 2020 00:24:04 +0200 Subject: some cleanups --- firmware/.cargo/config | 4 ++-- firmware/Cargo.lock | 32 ++++++++++++++++---------------- firmware/Cargo.toml | 4 ++-- firmware/src/main.rs | 16 ++++++---------- pcb/gerbers/CHANGELOG.md | 7 +++++-- 5 files changed, 31 insertions(+), 32 deletions(-) diff --git a/firmware/.cargo/config b/firmware/.cargo/config index 1a57e27..96e1aaa 100644 --- a/firmware/.cargo/config +++ b/firmware/.cargo/config @@ -2,8 +2,8 @@ # uncomment ONE of these three option to make `cargo run` start a GDB session # which option to pick depends on your system -runner = "arm-none-eabi-gdb -q -x openocd.gdb" -# runner = "gdb-multiarch -q -x openocd.gdb" +# runner = "arm-none-eabi-gdb -q -x openocd.gdb" +runner = "gdb-multiarch -q -x openocd.gdb" # runner = "gdb -q -x openocd.gdb" rustflags = ["-C", "link-arg=-Tlink.x"] diff --git a/firmware/Cargo.lock b/firmware/Cargo.lock index f7eadcc..b731acf 100644 --- a/firmware/Cargo.lock +++ b/firmware/Cargo.lock @@ -96,28 +96,28 @@ dependencies = [ ] [[package]] -name = "cortex-m-rtfm" +name = "cortex-m-rtic" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fc65a600a5c8baf0a5fd3b2c0223b8d8fc7aa7d6d0c9a3350ce40a4da49ccea" +checksum = "04cd388b154c7e7d212c5af7541ee1f174f29ccb0c22e9117f8d13a5aad233b6" dependencies = [ "cortex-m", "cortex-m-rt", - "cortex-m-rtfm-macros", + "cortex-m-rtic-macros", "heapless", - "rtfm-core", + "rtic-core", "version_check", ] [[package]] -name = "cortex-m-rtfm-macros" -version = "0.5.1" +name = "cortex-m-rtic-macros" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4a3fc88fff9970152a7f79bf6919d538395bc1f11ba90a1e6970a3521d8b88" +checksum = "29e29e01b3ec80d59bfd96aaf94d04008bebfde3ab7016e12bfbd6c0b466d22a" dependencies = [ "proc-macro2", "quote", - "rtfm-syntax", + "rtic-syntax", "syn", ] @@ -209,12 +209,12 @@ dependencies = [ ] [[package]] -name = "keyberon-f4" +name = "keyseebee" version = "0.1.0" dependencies = [ "cortex-m", "cortex-m-rt", - "cortex-m-rtfm", + "cortex-m-rtic", "embedded-hal", "generic-array 0.13.2", "keyberon", @@ -269,16 +269,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2a38df5b15c8d5c7e8654189744d8e396bddc18ad48041a500ce52d6948941f" [[package]] -name = "rtfm-core" +name = "rtic-core" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ec893edb2aa5b70320b94896ffea22a7ebb1cf3f942bb67cd5b60a865a63493" +checksum = "ab51fe832317e805f869b3d859f91aadf855c2c3da51f9b84bc645c201597158" [[package]] -name = "rtfm-syntax" +name = "rtic-syntax" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4455e23c34df3d66454e7e218a4d76a7f83321d04a806be614463341cec4116e" +checksum = "8152fcaa845720d61e6cc570548b89144c2c307f18a480bbd97e55e9f6eeff04" dependencies = [ "indexmap", "proc-macro2", @@ -356,9 +356,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cdb98bcb1f9d81d07b536179c269ea15999b5d14ea958196413869445bb5250" +checksum = "239f255b9e3429350f188c27b807fc9920a15eb9145230ff1a7d054c08fec319" dependencies = [ "proc-macro2", "quote", diff --git a/firmware/Cargo.toml b/firmware/Cargo.toml index b2a31b1..de35114 100644 --- a/firmware/Cargo.toml +++ b/firmware/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "keyberon-f4" +name = "keyseebee" version = "0.1.0" authors = ["Guillaume Pinot "] edition = "2018" @@ -10,7 +10,7 @@ cortex-m = "0.6" cortex-m-rt = { version = "0.6.10", features = ["device"] } panic-halt = "0.2.0" keyberon = { git = "https://github.com/TeXitoi/keyberon" } -cortex-m-rtfm = "0.5" +cortex-m-rtic = "0.5" generic-array = "0.13" embedded-hal = "0.2" usb-device = "0.2.0" diff --git a/firmware/src/main.rs b/firmware/src/main.rs index 9c261c0..71276c3 100644 --- a/firmware/src/main.rs +++ b/firmware/src/main.rs @@ -14,7 +14,7 @@ use keyberon::key_code::KbHidReport; use keyberon::key_code::KeyCode::{self, *}; use keyberon::layout::Layout; use keyberon::matrix::{Matrix, PressedKeys}; -use rtfm::app; +use rtic::app; use stm32f0xx_hal::gpio::{gpioa, gpiob, Input, Output, PullUp, PushPull}; use stm32f0xx_hal::prelude::*; use stm32f0xx_hal::usb; @@ -179,8 +179,10 @@ const APP: () = { } #[task(binds = USB, priority = 2, resources = [usb_dev, usb_class])] - fn usb_rx(mut c: usb_rx::Context) { - usb_poll(&mut c.resources.usb_dev, &mut c.resources.usb_class); + fn usb_rx(c: usb_rx::Context) { + if c.resources.usb_dev.poll(&mut [c.resources.usb_class]) { + c.resources.usb_class.poll(); + } } #[task(binds = TIM3, priority = 1, resources = [usb_class, matrix, debouncer, layout, timer])] @@ -199,15 +201,9 @@ const APP: () = { }; fn send_report(iter: impl Iterator, usb_class: &mut resources::usb_class<'_>) { - use rtfm::Mutex; + use rtic::Mutex; let report: KbHidReport = iter.collect(); if usb_class.lock(|k| k.device_mut().set_keyboard_report(report.clone())) { while let Ok(0) = usb_class.lock(|k| k.write(report.as_bytes())) {} } } - -fn usb_poll(usb_dev: &mut UsbDevice, keyboard: &mut UsbClass) { - if usb_dev.poll(&mut [keyboard]) { - keyboard.poll(); - } -} diff --git a/pcb/gerbers/CHANGELOG.md b/pcb/gerbers/CHANGELOG.md index 9f8ca1a..bf91806 100644 --- a/pcb/gerbers/CHANGELOG.md +++ b/pcb/gerbers/CHANGELOG.md @@ -1,5 +1,8 @@ -# Gerger CahngeLog +# Gerger change log ## v0.1 -First version. Ordered, not tested yet. +First version. Ordered at JLPCB, not tested yet. + +This version has the placeholder `JLCJLCJLCJLC` for use with the +option "Remove Order Number -> Specify a location" at JLPCB. -- cgit v1.2.3