The device's getProtectionState API provides information about the device's protection status.
This PR enhances the existing API by adding support for DFU (Device Firmware Upgrade) devices.
How this works
DFU Mode Detection: If the device is in DFU mode, the API retrieves the memory map, which contains information about the device's flash segments.
Protection Status Evaluation: For Internal Flash segments, the API checks the protection criteria:
If a segment is not readable, not writable, but is erasable, the device is considered Protected.
If any segment does not meet the above criteria, the device is classified as either an Open Device or a Protected Device (Service Mode).
The device's
getProtectionState
API provides information about the device's protection status.This PR enhances the existing API by adding support for DFU (Device Firmware Upgrade) devices.
How this works