/**@brief Bond Manager initialization. */ static void bond_manager_init(void) { uint32_t err_code; ble_bondmngr_init_t bond_init_data; bool bonds_delete; // Clear all bonded masters if the Bonds Delete button is pushed bonds_delete = (nrf_gpio_pin_read(BONDMNGR_DELETE_BUTTON_PIN_NO) == 0); // Initialize the Bond Manager bond_init_data.flash_page_num_bond = FLASH_PAGE_BOND; bond_init_data.flash_page_num_sys_attr = FLASH_PAGE_SYS_ATTR; bond_init_data.evt_handler = NULL; bond_init_data.error_handler = bond_manager_error_handler; bond_init_data.bonds_delete = bonds_delete; err_code = ble_bondmngr_init(&bond_init_data); APP_ERROR_CHECK(err_code); }
/**@brief Bond Manager initialization. */ static void bond_manager_init(void) { uint32_t err_code; ble_bondmngr_init_t bond_init_data; bool bonds_delete; // Clear all bonded masters if the "non-connectable advertisement start" button is pushed err_code = app_button_is_pushed(BONDMNGR_DELETE_BUTTON_PIN_NO, &bonds_delete); APP_ERROR_CHECK(err_code); // Initialize the Bond Manager bond_init_data.flash_page_num_bond = FLASH_PAGE_BOND; bond_init_data.flash_page_num_sys_attr = FLASH_PAGE_SYS_ATTR; bond_init_data.evt_handler = bond_evt_handler; bond_init_data.error_handler = bond_manager_error_handler; bond_init_data.bonds_delete = bonds_delete; err_code = ble_bondmngr_init(&bond_init_data); APP_ERROR_CHECK(err_code); }
/**@brief Bond Manager initialization. */ void bond_manager_init(void) { uint32_t err_code; ble_bondmngr_init_t bond_init_data; bool bonds_delete; // Clear all bonded masters if the Bonds Delete button is pushed err_code = app_button_is_pushed(BONDMNGR_DELETE_BUTTON_PIN_NO, &bonds_delete); APP_ERROR_CHECK(err_code); // Initialize the Bond Manager (set band storge flash) bond_init_data.flash_page_num_bond = FLASH_PAGE_BOND; bond_init_data.flash_page_num_sys_attr = FLASH_PAGE_SYS_ATTR; bond_init_data.evt_handler = NULL; bond_init_data.error_handler = bond_manager_error_handler; bond_init_data.bonds_delete = bonds_delete; err_code = ble_bondmngr_init(&bond_init_data); // intial (load bonding list from flash) APP_ERROR_CHECK(err_code); }
static error_t bond_manager_init(void) { ble_bondmngr_init_t bond_para = {0}; ASSERT_STATUS ( pstorage_init()); bond_para.flash_page_num_bond = CFG_BLE_BOND_FLASH_PAGE_BOND; bond_para.flash_page_num_sys_attr = CFG_BLE_BOND_FLASH_PAGE_SYS_ATTR; //bond_para.bonds_delete = boardButtonCheck(CFG_BLE_BOND_DELETE_BUTTON_NUM) ; bond_para.evt_handler = NULL; bond_para.error_handler = service_error_callback; ASSERT_STATUS( ble_bondmngr_init( &bond_para )); /* Init radio active/inactive notification to flash (to only perform flashing when the radio is inactive) */ // ASSERT_STATUS( ble_radio_notification_init(NRF_APP_PRIORITY_HIGH, // NRF_RADIO_NOTIFICATION_DISTANCE_4560US, // ble_flash_on_radio_active_evt) ); return ERROR_NONE; }
*/ static void bond_manager_init(void) { uint32_t err_code; ble_bondmngr_init_t bond_init_data; bool bonds_delete; // Initialize persistent storage module. err_code = pstorage_init(); APP_ERROR_CHECK(err_code); // Clear all bonded centrals if the Bonds Delete button is pushed bonds_delete = (nrf_gpio_pin_read(BONDMNGR_DELETE_BUTTON_PIN_NO) == 0); // Initialize the Bond Manager bond_init_data.evt_handler = NULL; bond_init_data.error_handler = bond_manager_error_handler; bond_init_data.bonds_delete = bonds_delete; err_code = ble_bondmngr_init(&bond_init_data); APP_ERROR_CHECK(err_code);
/**@brief Function for initializing the Bond Manager. */ static void bond_manager_init(void) { uint32_t err_code; ble_bondmngr_init_t bond_init_data; bool bonds_delete; err_code = pstorage_init(); APP_ERROR_CHECK(err_code); // Clear all bonded masters if the Bonds Delete button is pushed. err_code = app_button_is_pushed(BONDMNGR_DELETE_BUTTON_PIN_NO, &bonds_delete); APP_ERROR_CHECK(err_code); // Initialize the Bond Manager. bond_init_data.evt_handler = on_bond_mgmr_evt; bond_init_data.error_handler = bond_manager_error_handler; bond_init_data.bonds_delete = bonds_delete; err_code = ble_bondmngr_init(&bond_init_data); APP_ERROR_CHECK(err_code); }
*/ static void bond_manager_init(void) { uint32_t err_code; ble_bondmngr_init_t bond_init_data; bool bonds_delete; // Initialize persistent storage module. err_code = pstorage_init(); APP_ERROR_CHECK(err_code); // Clear all bonded centrals if the Bonds Delete button is pushed err_code = app_button_is_pushed(BONDMNGR_DELETE_BUTTON_PIN_NO, &bonds_delete); APP_ERROR_CHECK(err_code); // Initialize the Bond Manager bond_init_data.flash_page_num_bond = FLASH_PAGE_BOND; bond_init_data.flash_page_num_sys_attr = FLASH_PAGE_SYS_ATTR; bond_init_data.evt_handler = NULL; bond_init_data.error_handler = bond_manager_error_handler; bond_init_data.bonds_delete = bonds_delete; err_code = ble_bondmngr_init(&bond_init_data); APP_ERROR_CHECK(err_code);