What is touch_pad_get_status() supposed to return?

kiromaisus
Posts: 1
Joined: Mon Feb 08, 2021 9:48 pm

What is touch_pad_get_status() supposed to return?

Postby kiromaisus » Mon Feb 08, 2021 11:20 pm

Hi.
My first post was either deleted or didn't submit, idk.

What I want to do:
I have 7 touch buttons on my board and want to attach interrupts to everyone, calling the same function.
In this function I would like to use touch_pad_get_status() or other to get which button was touched. Then a switch case would do the rest.

What I'm facing:
This code

Code: Select all

  Serial.print("Button ");
  uint32_t touch = touch_pad_get_status();
  Serial.println(String(touch));
always returns 0, no matter what.

What I've tried:
Including this part of code to the setup

Code: Select all

  touch_pad_init();
  touch_pad_set_fsm_mode(TOUCH_FSM_MODE_TIMER);
Thanks in advance.

Who is online

Users browsing this forum: No registered users and 59 guests