if def for entire PF service
parent
26d7b6d420
commit
e08535a647
|
@ -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
|
||||
|
||||
|
|
|
@ -113,7 +113,6 @@ void MicroBitPartialFlashingService::onDataWritten(const GattWriteCallbackParams
|
|||
|
||||
break;
|
||||
}
|
||||
#if CONFIG_ENABLED(MICROBIT_BLE_PARTIAL_FLASHING)
|
||||
case FLASH_DATA:
|
||||
{
|
||||
// Process FLASH data packet
|
||||
|
@ -130,7 +129,6 @@ void MicroBitPartialFlashingService::onDataWritten(const GattWriteCallbackParams
|
|||
MicroBitEvent evt(MICROBIT_ID_PARTIAL_FLASHING, END_OF_TRANSMISSION);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
case MICROBIT_STATUS:
|
||||
{
|
||||
/*
|
||||
|
@ -159,14 +157,6 @@ void MicroBitPartialFlashingService::onDataWritten(const GattWriteCallbackParams
|
|||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
/* Return command unknown
|
||||
*/
|
||||
uint8_t unknownCommandBuffer[] = {data[0], 0xAB, 0xCD, 0xEF};
|
||||
ble.gattServer().notify(partialFlashCharacteristicHandle, (const uint8_t *)unknownCommandBuffer, sizeof(unknownCommandBuffer));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue