diff options
author | Brian Cully <bjc@kublai.com> | 2019-07-25 09:40:31 -0400 |
---|---|---|
committer | Brian Cully <bjc@kublai.com> | 2019-07-25 10:14:46 -0400 |
commit | 7966be1419d3eaa088ed83f95282383182585640 (patch) | |
tree | 3b7b09eb768d47e327035301f53f3bd23b7596f2 /app/src/main.rs | |
parent | 5b48a5c2f5526f088187fa341f64368994c9f517 (diff) | |
download | samd21-demo-7966be1419d3eaa088ed83f95282383182585640.tar.gz samd21-demo-7966be1419d3eaa088ed83f95282383182585640.zip |
Move USB host stuff to separate crate.
Diffstat (limited to 'app/src/main.rs')
-rwxr-xr-x | app/src/main.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/src/main.rs b/app/src/main.rs index b9f626e..792f339 100755 --- a/app/src/main.rs +++ b/app/src/main.rs @@ -8,7 +8,6 @@ mod dotstar; mod logger; mod macros; mod rtc; -mod usb; //#[allow(unused)] //use panic_halt; @@ -17,7 +16,7 @@ use clint::HandlerArray; use cortex_m::asm::wfi; use cortex_m_rt::{entry, exception, ExceptionFrame}; use embedded_hal::digital::v2::OutputPin; -use log::{error, info, LevelFilter}; +use log::{info, LevelFilter}; use smart_leds::colors; use smart_leds_trait::SmartLedsWrite; use trinket_m0::{ @@ -29,6 +28,7 @@ use trinket_m0::{ time::*, CorePeripherals, Peripherals, }; +use usbh::USBHost; static HANDLERS: HandlerArray = HandlerArray::new(); @@ -98,7 +98,7 @@ fn main() -> ! { let mut rtc_handler = rtc::setup(peripherals.RTC, &mut clocks); info!("setting up usb host"); - let (mut usb_host, mut usb_handler) = usb::USBHost::new( + let (mut usb_host, mut usb_handler) = USBHost::new( peripherals.USB, pins.usb_sof, pins.usb_dm, @@ -107,6 +107,7 @@ fn main() -> ! { &mut pins.port, &mut clocks, &mut peripherals.PM, + &rtc::millis, ); info!("setting up handlers"); |