Browse Source

crique zidle fix (#22948)

pull/22951/head
Dasky 3 months ago
committed by GitHub
parent
commit
2c3d0126ba
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 3 deletions
  1. +10
    -3
      drivers/sensors/cirque_pinnacle.c

+ 10
- 3
drivers/sensors/cirque_pinnacle.c View File

@ -218,9 +218,16 @@ void cirque_pinnacle_cursor_smoothing(bool enable) {
// Check sensor is connected
bool cirque_pinnacle_connected(void) {
uint8_t zidle = 0;
RAP_ReadBytes(HOSTREG__ZIDLE, &zidle, 1);
return zidle == HOSTREG__ZIDLE_DEFVAL;
uint8_t current_zidle = 0;
uint8_t temp_zidle = 0;
RAP_ReadBytes(HOSTREG__ZIDLE, &current_zidle, 1);
RAP_Write(HOSTREG__ZIDLE, HOSTREG__ZIDLE_DEFVAL);
RAP_ReadBytes(HOSTREG__ZIDLE, &temp_zidle, 1);
if (temp_zidle == HOSTREG__ZIDLE_DEFVAL) {
RAP_Write(HOSTREG__ZIDLE, current_zidle);
return true;
}
return false;
}
/* Pinnacle-based TM040040/TM035035/TM023023 Functions */


Loading…
Cancel
Save