DFUDriverImplementation

Defines the interface that implementors implementing DFUDriver for their respective bridgeOS need to implement

Implementors also need to define their respective ZipPackage definitions in order to extract the DFU image files from the Link provided zip

Inheritors

Functions

Link copied to clipboard
abstract fun cancelDfu(dfuDevice: DFUDevice)

Queues up an operation to cancel any ongoing DFU process

Link copied to clipboard
open suspend fun getActiveB0Slot(device: BluetoothDevice): Int?
Link copied to clipboard
abstract suspend fun sendSMPPayload(device: BluetoothDevice, payload: ByteArray = ByteArray(0)): Boolean

Sends an SMP command to group 64 (custom group) for devices in DFU mode

Link copied to clipboard
abstract suspend fun sendSMPReboot(device: BluetoothDevice): Boolean

Sends an SMP reboot command to group 1 (OS management group) to exit install mode

Link copied to clipboard
abstract fun startDfu(dfuDevice: DFUDevice, parsedManifest: ParsedManifest, onUpgradeStarted: () -> Unit, progress: (Float) -> Unit, completion: (Boolean) -> Unit)