STMicroelectronics / STM32CubeU5

Full Firmware Package for the STM32U5 series: HAL+LL drivers, CMSIS, BSP, MW, plus a set of Projects (examples and demos) running on all boards provided by ST (Nucleo, Evaluation and Discovery Kits).
Other
121 stars 67 forks source link

Sitronix Touchdriver broken #33

Closed maltevesper closed 4 months ago

maltevesper commented 10 months ago

The code to detect touch/no touch should be something along the lines of State->TouchDetected = data[2] & 0x80;. Unfortunately there is wildly convoluted code in the driver which only works, to detect the first press and never registers a release ("unpress").

maltevesper commented 10 months ago

Glimpsing over the rest of the code and noticing that there are bits like the following says enough about the software quality. I can not be bothered to provide PRs/fixes to a codebase that is riddled with incomplete and worse faulty implementations for basic features (Drawing to the display with an RGB Array did not work (#32 ), tocuhscreen does not recognize when the finger is lifted again).

    State->TouchX = (((uint32_t)data[2] & SITRONIX_TOUCH_POS_LSB_MASK) << 4);

    /* Send back first ready X position to caller */
    State->TouchX = ((((uint32_t)data[2] & SITRONIX_TOUCH_POS_LSB_MASK) << 4) | ((uint32_t)data[3]));

Furthermore, the touch controller supposedly does support multi touch, and the implementation is not that hard

It would be really nice if STM would provide better BSPs for their devices. And apparently, there are more places were STM could raise its quality standards: #31 .

TOUNSTM commented 4 months ago

ST Internal Reference: 141764

TOUNSTM commented 4 months ago

Hello @maltevesper,

First, we're sorry for the late response. The issue has already been solved in the latest Release v1.5.0.

Thank you very much for your report.

With regards,