fixup: configure optical sensor only during pointing device initialization.

This commit is contained in:
Mark Stosberg 2025-05-31 10:19:29 -04:00
parent 692472f4b7
commit a0a55bab90

View File

@ -70,6 +70,7 @@ static int16_t v_acm = 0;
void pointing_device_init_kb(void) { void pointing_device_init_kb(void) {
// set the CPI. // set the CPI.
pointing_device_set_cpi(cpi_array[cocot_config.cpi_idx]); pointing_device_set_cpi(cpi_array[cocot_config.cpi_idx]);
// Configure ADNS5050 sensor hardware
adns5050_write_reg(0x22, 0b10000 | 0x80); adns5050_write_reg(0x22, 0b10000 | 0x80);
} }
@ -181,7 +182,6 @@ void eeconfig_init_kb(void) {
cocot_config.scrl_mode = false; cocot_config.scrl_mode = false;
eeconfig_update_kb(cocot_config.raw); eeconfig_update_kb(cocot_config.raw);
eeconfig_init_user(); eeconfig_init_user();
adns5050_write_reg(0x22, 0b10000 | 0x80);
} }
@ -286,4 +286,3 @@ void oled_write_layer_state(void) {
} }
#endif #endif