Error events generation?


My Code:

buttonSetAddress = lv_btn_create(lv_scr_act());
lv_obj_add_event_cb(buttonSetAddress, btnSetAddressClicked, LV_EVENT_RELEASED, NULL);

static void btnSetAddressClicked(lv_event_t *event)

some code....


I press and hold the button.
I see it constantly generated LV_EVENT_RELEASED.

Expected Behavior - Single event LV_EVENT_PRESSED.

Am I wrong somewhere?

I think it will be a touch pad driver issue. I suggest printing/debugging the pressed and released states from the driver. I believe the drive continuously generates releases while it’s being pressed. Usually it happens when the touchpad controller generates only pulses on its IRQ pin and not a fixed level.