do hw reset when touch IC cannot communicate with MCU#999
Conversation
2a6211e to
d5ff703
Compare
|
|
||
| static void prv_exti_cb(bool *should_context_switch); | ||
| static void cst816_hw_reset(void); | ||
| void touch_sensor_set_enabled(bool enabled); |
There was a problem hiding this comment.
this function is called before implementation, so declare it here.
| if (!rv) { | ||
| PBL_LOG_ERR("Failed to read touch data, dropping event"); | ||
| PBL_LOG_ERR("get touch data error, reset the hw"); | ||
| touch_handle_update(0, TouchState_FingerUp, NULL, 0, current_time_ms); |
There was a problem hiding this comment.
what if there was no down event before?
There was a problem hiding this comment.
when it happens on touch down status, the upper layer may not know the hardware been reset with default FingerUp status, so force report the FingerUp event to upper layer.
| PBL_LOG_ERR("Failed to read touch data, dropping event"); | ||
| PBL_LOG_ERR("get touch data error, reset the hw"); | ||
| touch_handle_update(0, TouchState_FingerUp, NULL, 0, current_time_ms); | ||
| exti_disable(CST816->int_exti); |
There was a problem hiding this comment.
When do hw reset, don't know if the INT pin is stable or not, so force disable interrupt during reset cycle.
…mmunicate with MCU CST816 may hung up by ESD, so reset it when it cannot communicate with MCU. Signed-off-by: Yang Jiyun <yangjiyun@pro-well.tech>
d5ff703 to
ba21af7
Compare
|
This pull request has been marked as stale because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 7 days. Note, that you can always re-open a closed pull request at any time. |
CST816 may hung up by ESD, so reset it when it cannot communicate with MCU.