Now coding the Stack Touch Panel Driver for Apache RTOS 😬 ... Same I2C Touch Panel as PineTime

github.com/lupyuen/cst816s-nut

Driver for Cypress MBR3108 Touch Controller looks structurally similar to Stack's CST816S ... So we copy-n-paste into our CST816S Driver

github.com/lupyuen/cst816s-nut

Show thread

Stack's CST816S Touch Panel is a peculiar I2C Device ... It won't respond to I2C Scan unless we tap the screen and wake it up!

github.com/lupyuen/cst816s-nut

Show thread

Stack's Touch Panel triggers a GPIO Interrupt when we tap the screen ... Here's how we handle the GPIO Interrupt in

github.com/lupyuen/cst816s-nut

Show thread

Driver for Stack 's Touch Panel responds correctly to touch! 🎉 The touched coordinates are rotated sideways ... But we can fix that later in the ST7789 Display

github.com/lupyuen/cst816s-nut

Show thread

Touch Screen for Stack feels laggy on Apache RTOS right now ... 2 things we can fix: 1️⃣ Increase SPI Frequency 2️⃣ Switch to SPI DMA eventually

youtube.com/shorts/2Nzjrlp5lcE

Show thread
Follow

LVGL Test App calls read() repeatedly on Stack's Touch Panel Driver to get Touch Data ... But it should call poll() instead to block on Touch Data 🤔

github.com/lupyuen/cst816s-nut

Touch Coordinates read over I2C from Stack Touch Panel ... Are returned unchanged to the LVGL Test App as a Touch Down Event

github.com/lupyuen/cst816s-nut

Show thread

But for Touch Up Events the Touch Coordinates are invalid ... Our Stack driver patches the Touch Coordinates with the data from the last Touch Down Event

github.com/lupyuen/cst816s-nut

Show thread

Our Driver for Stack Touch Panel won't return any valid Touch Data unless we enable I2C Logging ... Could be an I2C Timing Issue or Race Condition 🤔

github.com/lupyuen/cst816s-nut

Show thread

Stack's Touch Panel will trigger a GPIO Interrupt when touched ... Here's how we handle the interrupt on Apache RTOS

lupyuen.github.io/articles/tou

Show thread

We prevent unnecessary I2C Reads in Stack's Touch Panel Driver ... By checking whether the screen has been touched

lupyuen.github.io/articles/tou

Show thread
Show more
Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.