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

Variable changing its value automatically in NRF_BLE_SCAN.c file

I am declaring the variable in one of the hardware drivers files that are provided by the nordic semiconductor. The variable is not static. The variable inside the function changes its value automatically from zero to one as soon as it enters into the BLE_scan method function. I am not able to understand the reason why the value itself getting updated.

  • Hello,

    I am declaring the variable in one of the hardware drivers files that are provided by the nordic semiconductor. The variable is not static. The variable inside the function changes its value automatically from zero to one as soon as it enters into the BLE_scan method function.

    Are you altering a driver provided in the SDK? If you are modifying a driver provided in the SDK, I strongly recommend that you create a version local to your project that you make your modifications to, so that you avoid accidentally breaking any other parts of the SDK.
    Which driver, and what would you like the modifications to achieve? And, what is the variable in question? It would be good to see some code here, if you could share. Please use the "Insert->Code" option when sharing code on DevZone.

    The variable is not static.

    If it is globally defined and non-static it will be accessible by functions declared in other files.
    Have you checked if the variable is accessed anywhere else in your project?

    Best regards,
    Karl

Related