void ble_db_discovery_on_ble_evt(ble_db_discovery_t * const p_db_discovery, const ble_evt_t * const p_ble_evt) { VERIFY_PARAM_NOT_NULL_VOID(p_db_discovery); VERIFY_PARAM_NOT_NULL_VOID(p_ble_evt); VERIFY_MODULE_INITIALIZED_VOID(); switch (p_ble_evt->header.evt_id) { case BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP: on_primary_srv_discovery_rsp(p_db_discovery, &(p_ble_evt->evt.gattc_evt)); break; case BLE_GATTC_EVT_CHAR_DISC_RSP: on_characteristic_discovery_rsp(p_db_discovery, &(p_ble_evt->evt.gattc_evt)); break; case BLE_GATTC_EVT_DESC_DISC_RSP: on_descriptor_discovery_rsp(p_db_discovery, &(p_ble_evt->evt.gattc_evt)); break; case BLE_GAP_EVT_DISCONNECTED: on_disconnected(p_db_discovery, &(p_ble_evt->evt.gap_evt)); break; default: break; } }
void nrf_free(void * p_mem) { VERIFY_MODULE_INITIALIZED_VOID(); NULL_PARAM_CHECK_VOID(p_mem); NRF_LOG_DEBUG("[MM]: >> nrf_free %p.\r\n", (uint32_t)p_mem); MM_MUTEX_LOCK(); uint32_t index; uint32_t memory_index = 0; for (index = 0; index < TOTAL_BLOCK_COUNT; index++) { if (&m_memory[memory_index] == p_mem) { // Found a free block of memory, assign. NRF_LOG_DEBUG("[MM]: << Freeing block %d.\r\n", index); block_init(index); break; } memory_index += get_block_size(index); } MM_MUTEX_UNLOCK(); NRF_LOG_DEBUG("[MM]: << nrf_free.\r\n"); return; }
void pm_on_ble_evt(ble_evt_t * p_ble_evt) { VERIFY_MODULE_INITIALIZED_VOID(); im_ble_evt_handler(p_ble_evt); sm_ble_evt_handler(p_ble_evt); gcm_ble_evt_handler(p_ble_evt); }
void pm_local_database_has_changed(void) { VERIFY_MODULE_INITIALIZED_VOID(); gcm_local_database_has_changed(); }