5import isystem.connect
as ic
12 connMgr = ic.ConnectionMgr()
13 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
15 devName =
"ST STM32C0x6 (32 kB)"
16 optCtrl = ic.COptionController(connMgr, ic.CStorageDeviceFactory.DEVICES_OPT_URL)
17 devIndex = optCtrl.index_of(
"Name", devName)
18 print(
"Index of the item whose 'Name' attribute has value " + devName + f
": {devIndex}")
20 storageCtrl = ic.CStorageDeviceFactory.makeDevice(connMgr, ic.EStorageDevice_EmbeddedFlashDevice, devIndex)
22 print(f
"Programed state (0x80000000, 16 bytes):")
23 data = ic.VectorBYTE(16)
24 storageCtrl.readState(ic.IConnectUMI.wProgDevice, 0x80000000, 16, data)
25 for index
in range(16):
26 print(f
"\tByte {index}, is programmed: {bool(data[index])}")
29if __name__ ==
"__main__":