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

Disabling BSP BLE Button module

Hi,
I tried to implement ble uart service in an existing project but when ble is connected the original bsp buttons functions stopped working. After some debugging i found that during ble connection and disconnection the bsp_ble_btn module assigns different actions for the BSP buttons.  I found a define macro in "sdk_config.h" named  "BSP_BTN_BLE_ENABLED"(there was little information about this macro online) that is set to 1 and changed it to 0(thinking it will disable the module) but it seems to do nothing(the define was no where to be found other than in sdk_config.h). After commenting the ble_evt_handler() in bsp_btn_ble.c the button started to work fine but don't know if it will cause any problem. I would like to know if there is any proper way to disable that module. Thanking you in advance.


Hari

Parents
  • Hi,

    It shouldn't cause any problems commenting out ble_evt_handler(). I saw through the function and what is does is to configure the buttons upon a connection and disconnection only. If you don't want to use BSP at all you can just remove the files and functions from the code.

  • Hi,

    Thank you for your response and we are glad to hear that but is there any proper way (other than commenting like changing some configuration) to disable the bsp ble buttons(need to only disable bsp_ble_btn module and not the entire bsp module as we need to use the bsp button library for our original code). And what about the "BSP_BTN_BLE_ENABLED"(it looks to do what we needed but doesn't seems to do anything) define,will it do anything.

    Regards,
    Hari

Reply
  • Hi,

    Thank you for your response and we are glad to hear that but is there any proper way (other than commenting like changing some configuration) to disable the bsp ble buttons(need to only disable bsp_ble_btn module and not the entire bsp module as we need to use the bsp button library for our original code). And what about the "BSP_BTN_BLE_ENABLED"(it looks to do what we needed but doesn't seems to do anything) define,will it do anything.

    Regards,
    Hari

Children
No Data
Related