extractFirmwareFromZip

abstract suspend fun extractFirmwareFromZip(zipFile: FirmwareArtifact, hardware: DeviceHardware, fileExtension: String, preferredFilename: String? = null): FirmwareArtifact?(source)

Extract a matching firmware binary from a previously-downloaded zip FirmwareArtifact.

Return

The extracted FirmwareArtifact, or null if no matching file was found.

Parameters

zipFile

The zip archive to extract from.

hardware

Used to match the correct binary inside the zip.

fileExtension

The extension to filter for (e.g. ".bin", ".uf2").

preferredFilename

Optional exact filename to prefer within the zip.