najnesnaj / pinetime-zephyr

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

Touchscreen driver hynitron cst816s #11

Closed najnesnaj closed 4 years ago

najnesnaj commented 4 years ago

When touched the touchscreen generates an interrupt. (see samples/basic/testirq) When touched the touchscreen becomes visible on the i2c-bus. (see samples/basic/scani2c)

When the touchscreen is visible, one should be able to read 63 consequetive registers (mass read) I had no succes using the standard zephyr function.

I tried (see samples/basic/scani2c) msgs[1].buf = &buffer[0]; msgs[1].len = 63U; msgs[1].flags = I2C_MSG_READ | I2C_MSG_STOP;

but this executes only once (why?)

it should work : see https://medium.com/@ly.lee/building-a-rust-driver-for-pinetimes-touch-controller-cbc1a5d5d3e9

najnesnaj commented 4 years ago

Adding a delay seemed to have resolved this problem, now I can read touchpoints. Will incorporate this in driver.