diff options
Diffstat (limited to 'src/main.rs')
-rwxr-xr-x | src/main.rs | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index 3c13e54..02812bd 100755 --- a/src/main.rs +++ b/src/main.rs @@ -65,7 +65,7 @@ fn main() -> ! { log::init(tx); - logln!("luchie started!"); + logln!("luchie starting…"); // cirque spi connections to spi1: // @@ -75,6 +75,7 @@ fn main() -> ! { // pa6 - miso1 // pa7 - mosi1 + logln!("init trackpad"); let dr_pin = gpiob.pb0; let sck_pin = gpioa.pa5.into_alternate_push_pull(&mut gpioa.crl); let miso_pin = gpioa.pa6; @@ -85,11 +86,18 @@ fn main() -> ! { (sck_pin, miso_pin, mosi_pin), &mut afio.mapr, spi::MODE_1, - 1.MHz(), + 1_500_000.Hz(), clocks, ); - let mut cirque = Cirque::new(cs_pin, dr_pin, &mut spi, clocks).expect("couldn't init touch pad"); + let mut cirque = match Cirque::new(cs_pin, dr_pin, &mut spi, clocks) { + Ok(c) => c, + Err(e) => { + logln!("err: {:?}", e); + panic!(); + } + }; + logln!("init usb"); // BluePill board has a pull-up resistor on the D+ line. // Pull the D+ pin down to send a RESET condition to the USB bus. // This forced reset is needed only for development, without it host @@ -116,6 +124,7 @@ fn main() -> ! { .device_class(USB_CLASS_CDC) .build(); + logln!("luchie started!"); loop { logln!("."); |