squishy.core.device.SquishyHardwareDevice
¶
Todo
Flesh this out
- class squishy.core.device.SquishyHardwareDevice(dev: USBDevice, serial: str, timeout: int = 2500, **kwargs)¶
Squishy Hardware Device
This class represents and abstracted Squishy hardware device, exposing a common and stable API for applets to interact with the hardware on.
- Parameters:
dev (usb1.USBDevice) – The USB device handle for the hardware platform.
serial (str) – The serial number of the device.
- Variables:
- static make_serial() str ¶
Make a new serial number string.
The default serial number is the current time and date in UTC in an ISO 8601-like format.
- Returns:
The new serial number
- Return type:
- classmethod get_device(serial: str = None) Type[SquishyHardwareDevice] | None ¶
Get attached Squishy device.
Get the attached and selected squishy device if possible, or if only one is attached to the system use that one.
- Parameters:
serial (str) – The serial number if any.
- Returns:
None – If no device is selected
squishy.core.device.SquishyHardwareDevice – The selected hardware if available.