Getting Timer IRQ when touch pad measure is done
Posted: Tue Jan 31, 2017 9:59 am
I'm using the touch pad in ESP32, the software example is nice, an IRQ handler get called when a pad is touched but I'm unable to have the information that the pad has been released.
Thus I've tried to use the touch_pad_read function but this function is blocking/stalling a little amount of time at the following line:
while (GET_PERI_REG_MASK(SENS_SAR_TOUCH_CTRL2_REG, SENS_TOUCH_MEAS_DONE) == 0) {};
Thus it does not fit my needs, I need a non blocking way to read the pad (either touched/untouched).
In sens_reg.h, I understand that the pad measure is handled by a timer.
Thus my question is what is this timer ? How can I get called (IRQ handler for instance) when the touch pad measure is done (SENS_SAR_TOUCH_CTRL2_REG->SENS_TOUCH_MEAS_DONE==1) ?
Best Regards,
Jerome
Thus I've tried to use the touch_pad_read function but this function is blocking/stalling a little amount of time at the following line:
while (GET_PERI_REG_MASK(SENS_SAR_TOUCH_CTRL2_REG, SENS_TOUCH_MEAS_DONE) == 0) {};
Thus it does not fit my needs, I need a non blocking way to read the pad (either touched/untouched).
In sens_reg.h, I understand that the pad measure is handled by a timer.
Thus my question is what is this timer ? How can I get called (IRQ handler for instance) when the touch pad measure is done (SENS_SAR_TOUCH_CTRL2_REG->SENS_TOUCH_MEAS_DONE==1) ?
Best Regards,
Jerome