diff options
author | Brian Cully <bjc@kublai.com> | 2022-10-27 20:09:08 -0400 |
---|---|---|
committer | Brian Cully <bjc@kublai.com> | 2022-10-27 20:09:08 -0400 |
commit | 5200c3cc2c87feca2bcb973e32eaeef9808fe032 (patch) | |
tree | 5f25e049051ac9d4ff7d2fd6c7256460c2ce7466 /src/main.rs | |
parent | 1316d1fe605d0b67571187dc23ea099dd9612d6c (diff) | |
download | luchie-5200c3cc2c87feca2bcb973e32eaeef9808fe032.tar.gz luchie-5200c3cc2c87feca2bcb973e32eaeef9808fe032.zip |
touchpad now works over spi
Diffstat (limited to 'src/main.rs')
-rwxr-xr-x | src/main.rs | 10 |
1 files changed, 5 insertions, 5 deletions
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); |