najnesnaj / pinetime-zephyr

pinetime smartwatch nrf52 zephyr
Apache License 2.0
107 stars 20 forks source link

interrupt on touchscreen cst816s #15

Open najnesnaj opened 4 years ago

najnesnaj commented 4 years ago

to test the interrupt : samples/sensor/cst816s samples/gui/lvtouch

the gui sample does not handle the interrupt.

Maybe this is linked to the GPIO led activation of the screen. The GPIO becomes unusable for interrupts?

nordic-krch commented 4 years ago

i can try to check that on weekend.

nordic-krch commented 4 years ago

i tried to compile sample with cst816s but it fails. I don't see DT binding file for it: https://github.com/najnesnaj/pinetime-zephyr/tree/master/dts/bindings/sensor

najnesnaj commented 4 years ago

I should work now. For testing the interrupt in the sensor/cts816s sample I used a counter in memory, there are of course easier methods :)

endian-albin commented 4 years ago

I've been trying to make this work for our PineTime Hypnos firmware but it doesn't play well with LittlevGL. @nordic-krch, would you like to give our code try? It compiles without warnings but tapping the screen freezes or crashes the application.

endian-albin commented 4 years ago

Never mind, I fixed it by switching from CONFIG_CST816S_TRIGGER_OWN_THREAD to CONFIG_CST816S_TRIGGER_GLOBAL_THREAD. I hope this will be helpful to others though...