summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2019-08-11 19:01:34 -0400
committerBrian Cully <bjc@kublai.com>2019-08-11 19:01:34 -0400
commit7fdc6a2c1b5799221f5d89d5f935cfe7dad4ccd2 (patch)
tree3ac13da04997361ddb688d2f666298d075aa14e2
parentcceebb087a7a8afc41e0523f6e98be2301ff3af1 (diff)
downloadbleusb-7fdc6a2c1b5799221f5d89d5f935cfe7dad4ccd2.tar.gz
bleusb-7fdc6a2c1b5799221f5d89d5f935cfe7dad4ccd2.zip
Move usb controller stuff to usb directory.
-rw-r--r--.gitignore2
-rw-r--r--Cargo.toml36
-rw-r--r--usb/.cargo/config (renamed from .cargo/config)0
-rw-r--r--usb/Cargo.lock (renamed from Cargo.lock)32
-rw-r--r--usb/Cargo.toml36
-rw-r--r--usb/Makefile (renamed from Makefile)0
-rwxr-xr-xusb/find-serial-port (renamed from find-serial-port)0
-rw-r--r--usb/src/dotstar.rs (renamed from src/dotstar.rs)0
-rw-r--r--usb/src/logger.rs (renamed from src/logger.rs)0
-rw-r--r--usb/src/macros.rs (renamed from src/macros.rs)0
-rw-r--r--usb/src/main.rs (renamed from src/main.rs)2
-rw-r--r--usb/src/rtc.rs (renamed from src/rtc.rs)0
12 files changed, 48 insertions, 60 deletions
diff --git a/.gitignore b/.gitignore
index 27bca1e..976120a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
*.bin
*.uf2
-/target
+*/target
**/*.rs.bk
diff --git a/Cargo.toml b/Cargo.toml
deleted file mode 100644
index d5535a9..0000000
--- a/Cargo.toml
+++ /dev/null
@@ -1,36 +0,0 @@
-[package]
-name = "bleusb"
-description = "Send boot keyboard reports over I²C."
-version = "0.1.0"
-authors = ["Brian Cully <bjc@kublai.com>"]
-edition = "2018"
-license = "GPL-3.0-or-later"
-repository = "https://github.com/bjc/bleusb.git"
-
-[dependencies]
-embedded-hal = "0.2"
-trinket_m0 = "0.4"
-log = "0.4"
-starb = "0.1"
-clint = "0.2"
-nb = "0.1"
-cortex-m = "0.6"
-cortex-m-rt = "0.6"
-smart-leds-trait = "0.2"
-smart-leds = "0.2"
-apa102-spi = "0.2"
-usb-host = "0.1"
-bootkbd = "0.1"
-atsamd-usb-host = { git = "https://github.com/bjc/atsamd-usb-host.git", rev = "385efdf53fa3fe38591f22d01edf75d3087c2326" }
-# atsamd-usb-host = { path = "../usbh/atsamd-usb-host" }
-
-[patch.crates-io]
-bootkbd = { git = "https://github.com/bjc/bootkbd.git", rev = "49827fce5adbaf636b893919f31c0dbd97bb3eb4" }
-usb-host = { git = "https://github.com/bjc/usb-host.git", rev = "b0be48424e81384de3280b5a5ac521d694b82e15" }
-trinket_m0 = { git = "https://github.com/atsamd-rs/atsamd.git", rev = "53f8d846e40715c8592d171d9a57b66ee303207a" }
-# trinket_m0 = { path = "../usbh/atsamd/boards/trinket_m0" }
-# bootkbd = { path = "../usbh/bootkbd" }
-# usb-host = { path = "../usbh/usb-host" }
-
-[features]
-default = ["atsamd-usb-host/samd21e18a"]
diff --git a/.cargo/config b/usb/.cargo/config
index b10f29d..b10f29d 100644
--- a/.cargo/config
+++ b/usb/.cargo/config
diff --git a/Cargo.lock b/usb/Cargo.lock
index c881d30..99b87a9 100644
--- a/Cargo.lock
+++ b/usb/Cargo.lock
@@ -49,9 +49,8 @@ dependencies = [
[[package]]
name = "atsamd-hal"
version = "0.6.0"
-source = "git+https://github.com/atsamd-rs/atsamd.git?rev=53f8d846e40715c8592d171d9a57b66ee303207a#53f8d846e40715c8592d171d9a57b66ee303207a"
dependencies = [
- "atsamd21e18a 0.5.0 (git+https://github.com/atsamd-rs/atsamd.git?rev=53f8d846e40715c8592d171d9a57b66ee303207a)",
+ "atsamd21e18a 0.5.0",
"bitfield 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)",
"cortex-m 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)",
"embedded-hal 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -64,13 +63,12 @@ dependencies = [
[[package]]
name = "atsamd-usb-host"
version = "0.1.0"
-source = "git+https://github.com/bjc/atsamd-usb-host.git?rev=385efdf53fa3fe38591f22d01edf75d3087c2326#385efdf53fa3fe38591f22d01edf75d3087c2326"
dependencies = [
"atsamd-hal 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"embedded-hal 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"starb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "usb-host 0.1.0 (git+https://github.com/bjc/usb-host.git?rev=b0be48424e81384de3280b5a5ac521d694b82e15)",
+ "usb-host 0.1.1",
]
[[package]]
@@ -86,7 +84,6 @@ dependencies = [
[[package]]
name = "atsamd21e18a"
version = "0.5.0"
-source = "git+https://github.com/atsamd-rs/atsamd.git?rev=53f8d846e40715c8592d171d9a57b66ee303207a#53f8d846e40715c8592d171d9a57b66ee303207a"
dependencies = [
"bare-metal 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"cortex-m 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -112,8 +109,8 @@ name = "bleusb"
version = "0.1.0"
dependencies = [
"apa102-spi 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "atsamd-usb-host 0.1.0 (git+https://github.com/bjc/atsamd-usb-host.git?rev=385efdf53fa3fe38591f22d01edf75d3087c2326)",
- "bootkbd 0.1.0 (git+https://github.com/bjc/bootkbd.git?rev=49827fce5adbaf636b893919f31c0dbd97bb3eb4)",
+ "atsamd-usb-host 0.1.0",
+ "bootkbd 0.2.0",
"clint 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cortex-m 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cortex-m-rt 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -123,17 +120,16 @@ dependencies = [
"smart-leds 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"smart-leds-trait 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"starb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "trinket_m0 0.4.0 (git+https://github.com/atsamd-rs/atsamd.git?rev=53f8d846e40715c8592d171d9a57b66ee303207a)",
- "usb-host 0.1.0 (git+https://github.com/bjc/usb-host.git?rev=b0be48424e81384de3280b5a5ac521d694b82e15)",
+ "trinket_m0 0.4.0",
+ "usb-host 0.1.1",
]
[[package]]
name = "bootkbd"
-version = "0.1.0"
-source = "git+https://github.com/bjc/bootkbd.git?rev=49827fce5adbaf636b893919f31c0dbd97bb3eb4#49827fce5adbaf636b893919f31c0dbd97bb3eb4"
+version = "0.2.0"
dependencies = [
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "usb-host 0.1.0 (git+https://github.com/bjc/usb-host.git?rev=b0be48424e81384de3280b5a5ac521d694b82e15)",
+ "usb-host 0.1.1",
]
[[package]]
@@ -357,9 +353,8 @@ dependencies = [
[[package]]
name = "trinket_m0"
version = "0.4.0"
-source = "git+https://github.com/atsamd-rs/atsamd.git?rev=53f8d846e40715c8592d171d9a57b66ee303207a#53f8d846e40715c8592d171d9a57b66ee303207a"
dependencies = [
- "atsamd-hal 0.6.0 (git+https://github.com/atsamd-rs/atsamd.git?rev=53f8d846e40715c8592d171d9a57b66ee303207a)",
+ "atsamd-hal 0.6.0",
"cortex-m 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)",
"cortex-m-rt 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"embedded-hal 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -378,8 +373,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "usb-host"
-version = "0.1.0"
-source = "git+https://github.com/bjc/usb-host.git?rev=b0be48424e81384de3280b5a5ac521d694b82e15#b0be48424e81384de3280b5a5ac521d694b82e15"
+version = "0.1.1"
[[package]]
name = "vcell"
@@ -405,13 +399,9 @@ dependencies = [
"checksum apa102-spi 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "244c305e53cabeadfce23409fe24bfcedaa20166aa3f16f6c4ab256302158fd5"
"checksum as-slice 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "293dac66b274fab06f95e7efb05ec439a6b70136081ea522d270bc351ae5bb27"
"checksum atsamd-hal 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9affce3b8d443195536c0b398a55a152cc962366c24824ea833bb22afd49b3d6"
-"checksum atsamd-hal 0.6.0 (git+https://github.com/atsamd-rs/atsamd.git?rev=53f8d846e40715c8592d171d9a57b66ee303207a)" = "<none>"
-"checksum atsamd-usb-host 0.1.0 (git+https://github.com/bjc/atsamd-usb-host.git?rev=385efdf53fa3fe38591f22d01edf75d3087c2326)" = "<none>"
"checksum atsamd21e18a 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "139787a30d118dd09a2e9570f5404cf582b70afe9b53dd1194239f9be382b897"
-"checksum atsamd21e18a 0.5.0 (git+https://github.com/atsamd-rs/atsamd.git?rev=53f8d846e40715c8592d171d9a57b66ee303207a)" = "<none>"
"checksum bare-metal 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a3caf393d93b2d453e80638d0674597020cef3382ada454faacd43d1a55a735a"
"checksum bitfield 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)" = "46afbd2983a5d5a7bd740ccb198caf5b82f45c40c09c0eed36052d91cb92e719"
-"checksum bootkbd 0.1.0 (git+https://github.com/bjc/bootkbd.git?rev=49827fce5adbaf636b893919f31c0dbd97bb3eb4)" = "<none>"
"checksum cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "b486ce3ccf7ffd79fdeb678eac06a9e6c09fc88d33836340becb8fffe87c5e33"
"checksum clint 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "200296af81a4cbe7da52afd9e5c35b7782eca865678caf2280251b777c9c37aa"
"checksum cortex-m 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)" = "3c0b159a1e8306949579de3698c841dba58058197b65c60807194e4fa1e7a554"
@@ -440,10 +430,8 @@ dependencies = [
"checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8"
"checksum starb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "36de9f301031f2a692afe144c8a757950d2b60b7fbf447055b8e19a9c232fb2c"
"checksum syn 0.15.42 (registry+https://github.com/rust-lang/crates.io-index)" = "eadc09306ca51a40555dd6fc2b415538e9e18bc9f870e47b1a524a79fe2dcf5e"
-"checksum trinket_m0 0.4.0 (git+https://github.com/atsamd-rs/atsamd.git?rev=53f8d846e40715c8592d171d9a57b66ee303207a)" = "<none>"
"checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169"
"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
-"checksum usb-host 0.1.0 (git+https://github.com/bjc/usb-host.git?rev=b0be48424e81384de3280b5a5ac521d694b82e15)" = "<none>"
"checksum vcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "45c297f0afb6928cd08ab1ff9d95e99392595ea25ae1b5ecf822ff8764e57a0d"
"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
"checksum volatile-register 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0d67cb4616d99b940db1d6bd28844ff97108b498a6ca850e5b6191a532063286"
diff --git a/usb/Cargo.toml b/usb/Cargo.toml
new file mode 100644
index 0000000..a1978dd
--- /dev/null
+++ b/usb/Cargo.toml
@@ -0,0 +1,36 @@
+[package]
+name = "bleusb"
+description = "Send boot keyboard reports over I²C."
+version = "0.1.0"
+authors = ["Brian Cully <bjc@kublai.com>"]
+edition = "2018"
+license = "GPL-3.0-or-later"
+repository = "https://github.com/bjc/bleusb.git"
+
+[dependencies]
+embedded-hal = "0.2"
+trinket_m0 = "0.4"
+log = "0.4"
+starb = "0.1"
+clint = "0.2"
+nb = "0.1"
+cortex-m = "0.6"
+cortex-m-rt = "0.6"
+smart-leds-trait = "0.2"
+smart-leds = "0.2"
+apa102-spi = "0.2"
+usb-host = "0.1"
+bootkbd = "0.2"
+#atsamd-usb-host = { git = "https://github.com/bjc/atsamd-usb-host.git", rev = "385efdf53fa3fe38591f22d01edf75d3087c2326" }
+atsamd-usb-host = { path = "../../usbh/atsamd-usb-host" }
+
+[patch.crates-io]
+#bootkbd = { git = "https://github.com/bjc/bootkbd.git", rev = "49827fce5adbaf636b893919f31c0dbd97bb3eb4" }
+#usb-host = { git = "https://github.com/bjc/usb-host.git", rev = "b0be48424e81384de3280b5a5ac521d694b82e15" }
+#trinket_m0 = { git = "https://github.com/atsamd-rs/atsamd.git", rev = "53f8d846e40715c8592d171d9a57b66ee303207a" }
+trinket_m0 = { path = "../../usbh/atsamd/boards/trinket_m0" }
+bootkbd = { path = "../../usbh/bootkbd" }
+usb-host = { path = "../../usbh/usb-host" }
+
+[features]
+default = ["atsamd-usb-host/samd21e18a"]
diff --git a/Makefile b/usb/Makefile
index 6d420d1..6d420d1 100644
--- a/Makefile
+++ b/usb/Makefile
diff --git a/find-serial-port b/usb/find-serial-port
index 62e2c0c..62e2c0c 100755
--- a/find-serial-port
+++ b/usb/find-serial-port
diff --git a/src/dotstar.rs b/usb/src/dotstar.rs
index 8e930d0..8e930d0 100644
--- a/src/dotstar.rs
+++ b/usb/src/dotstar.rs
diff --git a/src/logger.rs b/usb/src/logger.rs
index be9d391..be9d391 100644
--- a/src/logger.rs
+++ b/usb/src/logger.rs
diff --git a/src/macros.rs b/usb/src/macros.rs
index 46d2d07..46d2d07 100644
--- a/src/macros.rs
+++ b/usb/src/macros.rs
diff --git a/src/main.rs b/usb/src/main.rs
index a7cfd8a..36e4d1e 100644
--- a/src/main.rs
+++ b/usb/src/main.rs
@@ -106,7 +106,7 @@ fn main() -> ! {
Pa10<Output<OpenDrain>>,
> = unsafe { mem::transmute(&logger) };
unsafe { log::set_logger_racy(logger_ref).expect("couldn't set logger") };
- log::set_max_level(LevelFilter::Info);
+ log::set_max_level(LevelFilter::Trace);
let mut rtc_handler = rtc::setup(dp.RTC, &mut clocks);
diff --git a/src/rtc.rs b/usb/src/rtc.rs
index fa7b347..fa7b347 100644
--- a/src/rtc.rs
+++ b/usb/src/rtc.rs