This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Question about BLE stack

Hello,

I get a sample code in the dir flllowed after intsalling nRF51 SDK:

\Keil\ARM\Device\Nordic\nrf51822\Board\pca10001\s110\ble_app_beacon_code\main.c

but I still don't know how the BLE stack work after reading SDK document and the comment with the program. I have 2 Question as fllow comment, in detail, I want to know what these function does.

Regards,

Ricky

/**@brief Function for starting advertising.
 */
static void advertising_start(void)
{
    uint32_t err_code;

    err_code = sd_ble_gap_adv_start(&m_adv_params);//[Q1]How does this function worked?
    APP_ERROR_CHECK(err_code);

    nrf_gpio_pin_set(ADVERTISING_LED_PIN_NO);
}

/**@brief Function for doing power management.
 */
static void power_manage(void)
{
    uint32_t err_code = sd_app_evt_wait();//[Q2]How does this function worked?
    APP_ERROR_CHECK(err_code);
}
Related