class documentation

Converter for the device field of a flash header

The device field contains at least one device type and type ID pair (xx, yy), stored as xxyy. A flash header usually contains only has one pair in this field; the remainder of the field is null-padded. The exception is a TILicense, which can hold licenses for multiple devices.

Class Method get Converts bytes -> list[tuple[DeviceType, int]]
Class Method set Converts list[tuple[int | DeviceType, int]] -> bytes
def get(cls, data: bytes, **kwargs) -> list[tuple[DeviceType, int]]: (source)

Converts bytes -> list[tuple[DeviceType, int]]

Parameters
data:bytesThe raw bytes to convert
**kwargsUndocumented
Returns
list[tuple[DeviceType, int]]The device tuples stored in data
def set(cls, value: list[tuple[int | DeviceType, int]], **kwargs) -> bytes: (source)

Converts list[tuple[int | DeviceType, int]] -> bytes

Parameters
value:list[tuple[int | DeviceType, int]]The value to convert
**kwargsUndocumented
Returns
bytesThe device field derived from value