class documentation

class FlashDevices(Converter): (source)

View In Hierarchy

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[int, int]]
Class Method set Converts list[tuple[int, int]] -> bytes
Type Alias _T Undocumented
@classmethod
def get(cls, data: bytes, **kwargs) -> _T: (source)

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

Parameters
data:bytesThe raw bytes to convert
**kwargsUndocumented
Returns
_TThe device tuples stored in data
@classmethod
def set(cls, value: _T, **kwargs) -> bytes: (source)

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

Parameters
value:_TThe value to convert
**kwargsUndocumented
Returns
bytesThe device field derived from value

Undocumented

Value
list[tuple[int, int]]