SmartWaveAPI.definitions package

All the value definitions for the correct communication with a SmartWave device.

SmartWaveAPI.definitions.command module

class SmartWaveAPI.definitions.command.Command(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

The first byte of a command frame to be sent to the device; specifies the meaning of the following bytes.

Driver = 4
DriverPinMatrix = 7
FirmwareUpdate = 11
FpgaRead = 14
FpgaUpdate = 12
FpgaWrite = 13
General = 8
Heartbeat = 10
Info = 9
Pin = 5
Reset = 0
Stimulus = 3
StimulusDriverMatrix = 6
Stop = 2
Trigger = 1

SmartWaveAPI.definitions.drivertype module

class SmartWaveAPI.definitions.drivertype.DriverType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

The ID of the type of driver.

GPIO = 4
I2C = 1
I2S = 2
NoDriver = 255
SPI = 0
UART = 3

SmartWaveAPI.definitions.i2ctransaction module

class SmartWaveAPI.definitions.i2ctransaction.I2CRead(device_id: int, length: int)

Bases: object

A read operation on an I2C driver

class SmartWaveAPI.definitions.i2ctransaction.I2CTransactionResult(read: bool, device_id: int, ack_device_id: bool, data: bytes, acks_data: List[bool])

Bases: object

The result of an I2C transaction

class SmartWaveAPI.definitions.i2ctransaction.I2CWrite(device_id: int, data: bytes)

Bases: object

A write operation on an I2C driver

SmartWaveAPI.definitions.pinoutputtype module

class SmartWaveAPI.definitions.pinoutputtype.PinOutputType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

The output type of a pin.

Disable = 0
OpenDrain = 2
PushPull = 1

SmartWaveAPI.definitions.rgb565 module

SmartWaveAPI.definitions.rgb565.colorRGB565(color: str) int

Convert hex color to an RGB565 value.

Returns:

this driver’s color as an RGB565 value

Return type:

int

SmartWaveAPI.definitions.statusbit module

class SmartWaveAPI.definitions.statusbit.ErrorCode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

Specifies the type of error that occurred.

FPGACorrupt = 1
FirmwareCorrupt = 0
class SmartWaveAPI.definitions.statusbit.Statusbit(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

The first byte of a status frame sent by the device; specifies the meaning of the following bytes

Debug = 5
Error = 3
FirmwareUpdateFailed = 7
FirmwareUpdateOk = 6
FirmwareUpdateStatus = 11
Idle = 1
Info = 4
PinsStatus = 10
Readback = 8
Running = 2
SingleAddressRead = 9

SmartWaveAPI.definitions.stimulustype module

class SmartWaveAPI.definitions.stimulustype.StimulusType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

The ID of the type of stimulus.

Arbitrary = 0
NoStimulus = 1

SmartWaveAPI.definitions.triggermode module

class SmartWaveAPI.definitions.triggermode.TriggerMode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

Specifies the behavior of the trigger on the device.

Full = 1
Single = 0
Toggle = 2