/**@brief Function for dispatching a BLE stack event to all modules with a BLE stack event handler. * * @details This function is called from the scheduler in the main loop after a BLE stack event has * been received. * * @param[in] p_ble_evt Bluetooth stack event. */ static void ble_evt_dispatch(ble_evt_t * p_ble_evt) { if((p_ble_evt->evt.gap_evt.params.connected.role == BLE_GAP_ROLE_CENTRAL) || (m_conn_handle_central_hrs == p_ble_evt->evt.gap_evt.conn_handle) || (m_conn_handle_central_rsc == p_ble_evt->evt.gap_evt.conn_handle)) { dm_ble_evt_handler(p_ble_evt); ble_db_discovery_on_ble_evt(&m_ble_db_discovery, p_ble_evt); ble_hrs_c_on_ble_evt(&m_ble_hrs_c, p_ble_evt); ble_rscs_c_on_ble_evt(&m_ble_rsc_c, p_ble_evt); bsp_btn_ble_on_ble_evt(p_ble_evt); on_ble_central_evt(p_ble_evt); } if((p_ble_evt->evt.gap_evt.params.connected.role == BLE_GAP_ROLE_PERIPH) || (m_conn_handle_peripheral == p_ble_evt->evt.gap_evt.conn_handle)) { ble_hrs_on_ble_evt(&m_hrs, p_ble_evt); ble_rscs_on_ble_evt(&m_rscs, p_ble_evt); ble_conn_params_on_ble_evt(p_ble_evt); on_ble_peripheral_evt(p_ble_evt); ble_advertising_on_ble_evt(p_ble_evt); } }
/**@brief Function for dispatching a BLE stack event to all modules with a BLE stack event handler. * * @details This function is called from the BLE Stack event interrupt handler after a BLE stack * event has been received. * * @param[in] p_ble_evt Bluetooth stack event. */ static void ble_evt_dispatch(ble_evt_t * p_ble_evt) { dm_ble_evt_handler(p_ble_evt); ble_conn_params_on_ble_evt(p_ble_evt); bsp_btn_ble_on_ble_evt(p_ble_evt); on_ble_evt(p_ble_evt); ble_advertising_on_ble_evt(p_ble_evt); }
/**@brief Function for dispatching a BLE stack event to all modules with a BLE stack event handler. * * @details This function is called from the scheduler in the main loop after a BLE stack event has * been received. * * @param[in] p_ble_evt Bluetooth stack event. */ static void ble_evt_dispatch(ble_evt_t * p_ble_evt) { dm_ble_evt_handler(p_ble_evt); ble_db_discovery_on_ble_evt(&m_ble_db_discovery, p_ble_evt); ble_rscs_c_on_ble_evt(&m_ble_rsc_c, p_ble_evt); bsp_btn_ble_on_ble_evt(p_ble_evt); on_ble_evt(p_ble_evt); }
/**@brief Function for dispatching a SoftDevice event to all modules with a SoftDevice * event handler. * * @details This function is called from the SoftDevice event interrupt handler after a * SoftDevice event has been received. * * @param[in] p_ble_evt SoftDevice event. */ static void ble_evt_dispatch(ble_evt_t * p_ble_evt) { ble_conn_params_on_ble_evt(p_ble_evt); ble_nus_on_ble_evt(&m_nus, p_ble_evt); on_ble_evt(p_ble_evt); ble_advertising_on_ble_evt(p_ble_evt); bsp_btn_ble_on_ble_evt(p_ble_evt); }
/**@brief Function for dispatching a BLE stack event to all modules with a BLE stack event handler. * * @details This function is called from the BLE Stack event interrupt handler after a BLE stack * event has been received. * * @param[in] p_ble_evt Bluetooth stack event. */ static void ble_evt_dispatch(ble_evt_t * p_ble_evt) { dm_ble_evt_handler(p_ble_evt); ble_db_discovery_on_ble_evt(&m_ble_db_discovery, p_ble_evt); ble_conn_params_on_ble_evt(p_ble_evt); ble_ancs_c_on_ble_evt(&m_ancs_c, p_ble_evt); bsp_btn_ble_on_ble_evt(p_ble_evt); on_ble_evt(p_ble_evt); ble_advertising_on_ble_evt(p_ble_evt); }
/**@brief Function for dispatching a BLE stack event to all modules with a BLE stack event handler. * * @details This function is called from the BLE Stack event interrupt handler after a BLE stack * event has been received. * * @param[in] p_ble_evt Bluetooth stack event. */ static void ble_evt_dispatch(ble_evt_t * p_ble_evt) { ble_conn_state_on_ble_evt(p_ble_evt); pm_on_ble_evt(p_ble_evt); ble_conn_params_on_ble_evt(p_ble_evt); bsp_btn_ble_on_ble_evt(p_ble_evt); on_ble_evt(p_ble_evt); ble_advertising_on_ble_evt(p_ble_evt); nrf_ble_qwr_on_ble_evt(&m_qwr, p_ble_evt); }
/**@brief Function for dispatching a BLE stack event to all modules with a BLE stack event handler. * * @details This function is called from the BLE Stack event interrupt handler after a BLE stack * event has been received. * * @param[in] p_ble_evt Bluetooth stack event. */ static void ble_evt_dispatch(ble_evt_t * p_ble_evt) { ble_conn_state_on_ble_evt(p_ble_evt); pm_on_ble_evt(p_ble_evt); ble_hrs_on_ble_evt(&m_hrs, p_ble_evt); ble_bas_on_ble_evt(&m_bas, p_ble_evt); ble_conn_params_on_ble_evt(p_ble_evt); bsp_btn_ble_on_ble_evt(p_ble_evt); on_ble_evt(p_ble_evt); ble_advertising_on_ble_evt(p_ble_evt); }
/**@brief Function for dispatching a BLE stack event to all modules with a BLE stack event handler. * * @details This function is called from the BLE Stack event interrupt handler after a BLE stack * event has been received. * * @param[in] p_ble_evt Bluetooth stack event. */ static void ble_evt_dispatch(ble_evt_t * p_ble_evt) { ble_conn_state_on_ble_evt(p_ble_evt); pm_on_ble_evt(p_ble_evt); ble_db_discovery_on_ble_evt(&m_ble_db_discovery, p_ble_evt); ble_conn_params_on_ble_evt(p_ble_evt); ble_ans_c_on_ble_evt(&m_ans_c, p_ble_evt); bsp_btn_ble_on_ble_evt(p_ble_evt); on_ble_evt(p_ble_evt); ble_advertising_on_ble_evt(p_ble_evt); }
/**@brief Function for dispatching a BLE stack event to all modules with a BLE stack event handler. * * @details This function is called from the BLE Stack event interrupt handler after a BLE stack * event has been received. * * @param[in] p_ble_evt Bluetooth stack event. */ static void ble_evt_dispatch(ble_evt_t * p_ble_evt) { dm_ble_evt_handler(p_ble_evt); ble_conn_params_on_ble_evt(p_ble_evt); ble_ias_on_ble_evt(&m_ias, p_ble_evt); ble_lls_on_ble_evt(&m_lls, p_ble_evt); ble_bas_on_ble_evt(&m_bas, p_ble_evt); ble_ias_c_on_ble_evt(&m_ias_c, p_ble_evt); ble_tps_on_ble_evt(&m_tps, p_ble_evt); bsp_btn_ble_on_ble_evt(p_ble_evt); on_ble_evt(p_ble_evt); }
/**@brief Function for dispatching a BLE stack event to all modules with a BLE stack event handler. * * @details This function is called from the BLE Stack event interrupt handler after a BLE stack * event has been received. * * @param[in] p_ble_evt Bluetooth stack event. */ static void ble_evt_dispatch(ble_evt_t * p_ble_evt) { dm_ble_evt_handler(p_ble_evt); ble_conn_params_on_ble_evt(p_ble_evt); bsp_btn_ble_on_ble_evt(p_ble_evt); on_ble_evt(p_ble_evt); ble_advertising_on_ble_evt(p_ble_evt); /*YOUR_JOB add calls to _on_ble_evt functions from each service your application is using ble_xxs_on_ble_evt(&m_xxs, p_ble_evt); ble_yys_on_ble_evt(&m_yys, p_ble_evt); */ }
/**@brief Function for dispatching a BLE stack event to all modules with a BLE stack event handler. * * @details This function is called from the BLE Stack event interrupt handler after a BLE stack * event has been received. * * @param[in] p_ble_evt Bluetooth stack event. */ static void ble_evt_dispatch(ble_evt_t * p_ble_evt) { /** The Connection state module has to be fed BLE events in order to function correctly * Remember to call ble_conn_state_on_ble_evt before calling any ble_conns_state_* functions. */ ble_conn_state_on_ble_evt(p_ble_evt); pm_on_ble_evt(p_ble_evt); ble_cscs_on_ble_evt(&m_cscs, p_ble_evt); ble_bas_on_ble_evt(&m_bas, p_ble_evt); ble_conn_params_on_ble_evt(p_ble_evt); bsp_btn_ble_on_ble_evt(p_ble_evt); on_ble_evt(p_ble_evt); ble_advertising_on_ble_evt(p_ble_evt); }
/**@brief Function for dispatching a BLE stack event to all modules with a BLE stack event handler. * * @details This function is called from the BLE Stack event interrupt handler after a BLE stack * event has been received. * * @param[in] p_ble_evt Bluetooth stack event. */ static void ble_evt_dispatch(ble_evt_t * p_ble_evt) { // APPL_LOG("ble_evt_dispatch evt_id %d \r\n", (int)p_ble_evt->header.evt_id); dm_ble_evt_handler(p_ble_evt); ble_conn_params_on_ble_evt(p_ble_evt); bsp_btn_ble_on_ble_evt(p_ble_evt); ble_advertising_on_ble_evt(p_ble_evt); if (p_ble_evt->header.evt_id == BLE_GAP_EVT_DISCONNECTED || p_ble_evt->header.evt_id == BLE_GAP_EVT_TIMEOUT) { advertising_init(); } on_ble_evt(p_ble_evt); bluetooth_on_ble_evt(p_ble_evt); }
/**@brief Function for dispatching a BLE stack event to all modules with a BLE stack event handler. * * @details This function is called from the BLE Stack event interrupt handler after a BLE stack * event has been received. * * @param[in] p_ble_evt Bluetooth stack event. */ static void ble_evt_dispatch(ble_evt_t * p_ble_evt) { dm_ble_evt_handler(p_ble_evt); ble_hrs_on_ble_evt(&m_hrs, p_ble_evt); ble_bas_on_ble_evt(&m_bas, p_ble_evt); ble_conn_params_on_ble_evt(p_ble_evt); bsp_btn_ble_on_ble_evt(p_ble_evt); #ifdef BLE_DFU_APP_SUPPORT /** @snippet [Propagating BLE Stack events to DFU Service] */ ble_dfu_on_ble_evt(&m_dfus, p_ble_evt); /** @snippet [Propagating BLE Stack events to DFU Service] */ #endif // BLE_DFU_APP_SUPPORT on_ble_evt(p_ble_evt); ble_advertising_on_ble_evt(p_ble_evt); }
/**@brief Function for dispatching a BLE stack event to all modules with a BLE stack event handler. * * @details This function is called from the BLE Stack event interrupt handler after a BLE stack * event has been received. * * @param[in] p_ble_evt Bluetooth stack event. */ static void ble_evt_dispatch(ble_evt_t * p_ble_evt) { /** The Connection state module has to be fed BLE events in order to function correctly * Remember to call ble_conn_state_on_ble_evt before calling any ble_conns_state_* functions. */ ble_conn_state_on_ble_evt(p_ble_evt); pm_on_ble_evt(p_ble_evt); ble_conn_params_on_ble_evt(p_ble_evt); bsp_btn_ble_on_ble_evt(p_ble_evt); on_ble_evt(p_ble_evt); ble_advertising_on_ble_evt(p_ble_evt); /*YOUR_JOB add calls to _on_ble_evt functions from each service your application is using ble_xxs_on_ble_evt(&m_xxs, p_ble_evt); ble_yys_on_ble_evt(&m_yys, p_ble_evt); */ }
/**@brief Function for dispatching a S110 SoftDevice event to all modules with a S110 SoftDevice * event handler. * * @details This function is called from the S110 SoftDevice event interrupt handler after a S110 * SoftDevice event has been received. * * @param[in] p_ble_evt S110 SoftDevice event. */ static void ble_evt_dispatch(ble_evt_t * p_ble_evt) { #ifdef BLE_DFU_APP_SUPPORT dm_ble_evt_handler(p_ble_evt); #endif ble_conn_params_on_ble_evt(p_ble_evt); bsp_btn_ble_on_ble_evt(p_ble_evt); ble_nus_on_ble_evt(&m_nus, p_ble_evt); #if ENABLE_NEW_SERVECE new_service_nus_on_ble_evt(&new_m_nus, p_ble_evt); #endif #ifdef BLE_DFU_APP_SUPPORT /** @snippet [Propagating BLE Stack events to DFU Service] */ ble_dfu_on_ble_evt(&m_dfus, p_ble_evt); /** @snippet [Propagating BLE Stack events to DFU Service] */ #endif // BLE_DFU_APP_SUPPORT on_ble_evt(p_ble_evt); ble_advertising_on_ble_evt(p_ble_evt); //bsp_btn_ble_on_ble_evt(p_ble_evt); }