Merge pull request #382 from microbit-sam/pf-yt-toggle
Use config.json to enable / disable Partial Flashing Service
This commit is contained in:
commit
34e46f04e4
3 changed files with 15 additions and 0 deletions
|
@ -303,6 +303,14 @@ extern uint32_t __etext;
|
|||
#define MICROBIT_BLE_DEVICE_INFORMATION_SERVICE 1
|
||||
#endif
|
||||
|
||||
// Enable/Disable BLE Service: MicroBitPartialFlashingService
|
||||
// This enables the flashing part of the partial flashing service.
|
||||
// Partial flashing is currently only possible for programs built using MakeCode
|
||||
// and is disabled by default.
|
||||
#ifndef MICROBIT_BLE_PARTIAL_FLASHING
|
||||
#define MICROBIT_BLE_PARTIAL_FLASHING 0
|
||||
#endif
|
||||
|
||||
//
|
||||
// Accelerometer options
|
||||
//
|
||||
|
|
|
@ -125,6 +125,10 @@
|
|||
#define MICROBIT_BLE_ADVERTISING_INTERVAL YOTTA_CFG_MICROBIT_DAL_BLUETOOTH_ADVERTISING_INTERVAL
|
||||
#endif
|
||||
|
||||
#ifdef YOTTA_CFG_MICROBIT_DAL_BLUETOOTH_PARTIAL_FLASHING
|
||||
#define MICROBIT_BLE_PARTIAL_FLASHING YOTTA_CFG_MICROBIT_DAL_BLUETOOTH_PARTIAL_FLASHING
|
||||
#endif
|
||||
|
||||
//we check if the user has requested open mode, otherwise we will double def!
|
||||
#if (YOTTA_CFG_MICROBIT_DAL_BLUETOOTH_OPEN == 0)
|
||||
|
||||
|
|
|
@ -383,6 +383,9 @@ void MicroBitBLEManager::init(ManagedString deviceName, ManagedString serialNumb
|
|||
// Bring up core BLE services.
|
||||
#if CONFIG_ENABLED(MICROBIT_BLE_DFU_SERVICE)
|
||||
new MicroBitDFUService(*ble);
|
||||
#endif
|
||||
|
||||
#if CONFIG_ENABLED(MICROBIT_BLE_PARTIAL_FLASHING)
|
||||
new MicroBitPartialFlashingService(*ble, messageBus);
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue