Edit
Dependencies: Lis2dh12 aconno_I2C aconno_nrf52_uart adc52832_common aconno_SEGGER_RTT
aconno_ble/aconno_ble.cpp
- Committer:
- jurica238814
- Date:
- 2018-03-02
- Branch:
- NanoModule
- Revision:
- 13:7ae1c5bcccb5
- Parent:
- 3:f2078081a779
File content as of revision 13:7ae1c5bcccb5:
/* * 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); }