remove phototransistor workarounds, new rev of Pro addresses them

This commit is contained in:
joeycastillo
2024-11-10 23:40:58 -05:00
parent 9c3c09a021
commit 1bd53a001d
2 changed files with 10 additions and 5 deletions

View File

@@ -44,7 +44,8 @@ void light_sensor_face_setup(uint8_t watch_face_index, void ** context_ptr) {
void light_sensor_face_activate(void *context) {
light_sensor_state_t *state = (light_sensor_state_t *)context;
(void) state;
HAL_GPIO_IRSENSE_in();
HAL_GPIO_IR_ENABLE_out();
HAL_GPIO_IR_ENABLE_clr();
HAL_GPIO_IRSENSE_pmuxen(HAL_GPIO_PMUX_ADC);
adc_init();
adc_enable();
@@ -89,6 +90,7 @@ void light_sensor_face_resign(void *context) {
adc_disable();
HAL_GPIO_IRSENSE_pmuxdis();
HAL_GPIO_IRSENSE_off();
HAL_GPIO_IR_ENABLE_off();
}
#endif // HAS_IR_SENSOR