create

fun create(peripheral: Peripheral): DfuController

Create a DfuController with automatic protocol detection.

Inspects the peripheral's discovered services to determine which DFU protocol it supports.

Return

a DfuController configured for the detected protocol

Parameters

peripheral

a connected peripheral with discovered services

Throws

if no DFU service is detected