bpod_core.constants#

Constants and identifiers used throughout the package.

Classes#

class bpod_core.constants.TeensyModel #

Bases: IntEnum

Teensy models, as reported in the USB device release number (bcdDevice).

The Teensy core sets these for USB serial types; MIDI and flight simulator types report 0x0211 or 0x0212 instead.

TEENSY_3_0 = 628#

Teensy 3.0.

TEENSY_3_2 = 629#

Teensy 3.1 and 3.2.

TEENSY_3_5 = 630#

Teensy 3.5.

TEENSY_3_6 = 631#

Teensy 3.6.

TEENSY_4_0 = 633#

Teensy 4.0.

TEENSY_4_1 = 640#

Teensy 4.1.

TEENSY_LC = 627#

Teensy LC.

TEENSY_MICROMOD = 641#

Teensy MicroMod.

class bpod_core.constants.TeensyPID #

Bases: IntEnum

Product IDs of Teensy microcontrollers.

DUAL_SERIAL = 1163#

Product ID of Teensy microcontrollers with dual USB serial ports.

SERIAL = 1155#

Product ID of Teensy microcontrollers with single USB serial port.

TRIPLE_SERIAL = 1164#

Product ID of Teensy microcontrollers with triple USB serial ports.

Attributes#

bpod_core.constants.INT8_MIN: int = -128#

Minimum value for a signed 8-bit integer.

bpod_core.constants.INT16_MIN: int = -32768#

Minimum value for a signed 16-bit integer.

bpod_core.constants.INT32_MIN: int = -2147483648#

Minimum value for a signed 32-bit integer.

bpod_core.constants.INT64_MIN: int = -9223372036854775808#

Minimum value for a signed 64-bit integer.

bpod_core.constants.INT8_MAX: int = 127#

Maximum value for a signed 8-bit integer.

bpod_core.constants.INT16_MAX: int = 32767#

Maximum value for a signed 16-bit integer.

bpod_core.constants.INT32_MAX: int = 2147483647#

Maximum value for a signed 32-bit integer.

bpod_core.constants.INT64_MAX: int = 9223372036854775807#

Maximum value for a signed 64-bit integer.

bpod_core.constants.UINT8_MAX: int = 255#

Maximum value for an unsigned 8-bit integer.

bpod_core.constants.UINT12_MAX: int = 4095#

Maximum value for an unsigned 12-bit integer.

bpod_core.constants.UINT16_MAX: int = 65535#

Maximum value for an unsigned 16-bit integer.

bpod_core.constants.UINT32_MAX: int = 4294967295#

Maximum value for an unsigned 32-bit integer.

bpod_core.constants.FMT_UINT8: str = 'B'#

Format string for an unsigned 8-bit integer.

bpod_core.constants.FMT_UINT16_LE: str = '<H'#

Format string for an unsigned 16-bit integer (little-endian).

bpod_core.constants.FMT_UINT32_LE: str = '<I'#

Format string for an unsigned 32-bit integer (little-endian).

bpod_core.constants.FMT_UINT64_LE: str = '<Q'#

Format string for an unsigned 64-bit integer (little-endian).

bpod_core.constants.FMT_INT8: str = 'b'#

Format string for a signed 8-bit integer.

bpod_core.constants.FMT_INT16_LE: str = '<h'#

Format string for a signed 16-bit integer (little-endian).

bpod_core.constants.FMT_INT32_LE: str = '<i'#

Format string for a signed 32-bit integer (little-endian).

bpod_core.constants.FMT_INT64_LE: str = '<q'#

Format string for a signed 64-bit integer (little-endian).

bpod_core.constants.STRUCT_UINT8: Struct = Struct('B')#

Compiled struct representing an unsigned 8-bit integer.

bpod_core.constants.STRUCT_UINT16_LE: Struct = Struct('<H')#

Compiled struct representing an unsigned 16-bit integer (little-endian).

bpod_core.constants.STRUCT_UINT32_LE: Struct = Struct('<I')#

Compiled struct representing an unsigned 32-bit integer (little-endian).

bpod_core.constants.STRUCT_UINT64_LE: Struct = Struct('<Q')#

Compiled struct representing an unsigned 64-bit integer (little-endian).

bpod_core.constants.STRUCT_INT8: Struct = Struct('b')#

Compiled struct representing a signed 8-bit integer.

bpod_core.constants.STRUCT_INT16_LE: Struct = Struct('<h')#

Compiled struct representing a signed 16-bit integer (little-endian).

bpod_core.constants.STRUCT_INT32_LE: Struct = Struct('<i')#

Compiled struct representing a signed 32-bit integer (little-endian).

bpod_core.constants.STRUCT_INT64_LE: Struct = Struct('<q')#

Compiled struct representing a signed 64-bit integer (little-endian).

bpod_core.constants.IPV4_LOOPBACK: str = '127.0.0.1'#

IPv4 loopback address.

bpod_core.constants.IPV4_WILDCARD: str = '0.0.0.0'#

IPv4 wildcard address for binding to all interfaces.

bpod_core.constants.VID_TEENSY: int = 5824#

Vendor ID of Teensy microcontrollers.

bpod_core.constants.VID_ARDUINO: int = 9025#

Vendor ID of Arduino boards.

bpod_core.constants.PID_DUE_NATIVE: int = 62#

Product ID of the native USB port of an Arduino Due, which a Bpod 0.7-1.0 uses.

The Due's programming port (0x003D) is not one: opening it resets the Due. Opening and closing the native port at 1200 baud erases the Due's firmware.