From 5200c3cc2c87feca2bcb973e32eaeef9808fe032 Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Thu, 27 Oct 2022 20:09:08 -0400 Subject: touchpad now works over spi --- src/main.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 02812bd..1697001 100755 --- a/src/main.rs +++ b/src/main.rs @@ -76,7 +76,8 @@ fn main() -> ! { // pa7 - mosi1 logln!("init trackpad"); - let dr_pin = gpiob.pb0; + // TODO: hook an interrupt up to the dr pin to trigger a poll. + //let dr_pin = gpiob.pb1.into_pull_down_input(&mut gpiob.crl); let sck_pin = gpioa.pa5.into_alternate_push_pull(&mut gpioa.crl); let miso_pin = gpioa.pa6; let mosi_pin = gpioa.pa7.into_alternate_push_pull(&mut gpioa.crl); @@ -86,10 +87,10 @@ fn main() -> ! { (sck_pin, miso_pin, mosi_pin), &mut afio.mapr, spi::MODE_1, - 1_500_000.Hz(), + 1_000_000.Hz(), // pinnacle supports up to 13mhz clocks, ); - let mut cirque = match Cirque::new(cs_pin, dr_pin, &mut spi, clocks) { + let mut cirque = match Cirque::new(cs_pin, &mut spi, clocks) { Ok(c) => c, Err(e) => { logln!("err: {:?}", e); @@ -126,8 +127,7 @@ fn main() -> ! { logln!("luchie started!"); loop { - logln!("."); - + // logln!("."); if let Ok(mut td) = cirque.poll(&mut spi) { td.scale_to(1920, 1080); logln!("td: {:?}", td); -- cgit v1.2.3