![](/media/cache/profiles/b5c4ec91390a6fbccf8d918d443563ed.jpg.50x50_q85.jpg)
Edit
Dependencies: Lis2dh12 aconno_I2C aconno_nrf52_uart adc52832_common aconno_SEGGER_RTT
aconno_ble/aconno_ble.cpp
- Committer:
- jurica238814
- Date:
- 2018-01-16
- Revision:
- 3:f2078081a779
File content as of revision 3:f2078081a779:
/* * Made by Jurica Resetar @ aconno * More info @ aconno.de * */ #include "aconno_ble.h" /** * Callback triggered when the ble initialization process has finished */ void bleInitComplete(BLE::InitializationCompleteCallbackContext *params){ BLE& ble = params->ble; ble_error_t error = params->error; if (error != BLE_ERROR_NONE) { return; } /* Ensure that it is the default instance of BLE */ if(ble.getInstanceID() != BLE::DEFAULT_INSTANCE) { return; } /* setup advertising */ ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::COMPLETE_LOCAL_NAME, (uint8_t *)DEVICE_NAME, sizeof(DEVICE_NAME)); ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::MANUFACTURER_SPECIFIC_DATA, (uint8_t *)MSD, MSD_SIZE_b); ble.gap().setAdvertisingInterval(ADV_INTERVAL_MS); }