This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SDK 7.2, APP_BUTTON_RELEASE

Hi, I'm not used to the bsp.c so my question could be silly. I hope you could understand.

When I used SDK 6.1, the example about button_event_handler function had a parameter

related to the button_action.

static void button_event_handler(uint8_t pin_no, uint8_t button_action) { //SDK 6.1

        if(APP_BUTTON_PUSH) { }

        else if(APP_BUTTON_RELEASE) { }

}

Whereas, the SDK 7.2 (which I'm currently using) does not have that parameter.

static void button_event_handler(bsp_event_t event){ //SDK 7.2

       switch (event) {  }

}

I found that app_button.c has the control statement

to configure whether it is pressed or released.

image description

Using SDK 7.2, how can I control the event with the button actions

without editing the given API?

-Regards, Mango922

Parents Reply Children
No Data
Related