34 строки
989 B
Python
34 строки
989 B
Python
# Autogenerated constants for Serial service
|
|
from enum import IntEnum
|
|
from jacdac.constants import *
|
|
from jacdac.system.constants import *
|
|
JD_SERVICE_CLASS_SERIAL = const(0x11bae5c4)
|
|
|
|
|
|
class SerialParityType(IntEnum):
|
|
NONE = const(0x0)
|
|
EVEN = const(0x1)
|
|
ODD = const(0x2)
|
|
|
|
|
|
JD_SERIAL_REG_CONNECTED = const(JD_REG_INTENSITY)
|
|
JD_SERIAL_REG_CONNECTION_NAME = const(0x181)
|
|
JD_SERIAL_REG_BAUD_RATE = const(0x80)
|
|
JD_SERIAL_REG_DATA_BITS = const(0x81)
|
|
JD_SERIAL_REG_STOP_BITS = const(0x82)
|
|
JD_SERIAL_REG_PARITY_MODE = const(0x83)
|
|
JD_SERIAL_REG_BUFFER_SIZE = const(0x84)
|
|
JD_SERIAL_CMD_SEND = const(0x80)
|
|
JD_SERIAL_CMD_RECEIVED = const(0x80)
|
|
JD_SERIAL_PACK_FORMATS = {
|
|
JD_SERIAL_REG_CONNECTED: "u8",
|
|
JD_SERIAL_REG_CONNECTION_NAME: "s",
|
|
JD_SERIAL_REG_BAUD_RATE: "u32",
|
|
JD_SERIAL_REG_DATA_BITS: "u8",
|
|
JD_SERIAL_REG_STOP_BITS: "u8",
|
|
JD_SERIAL_REG_PARITY_MODE: "u8",
|
|
JD_SERIAL_REG_BUFFER_SIZE: "u8",
|
|
JD_SERIAL_CMD_SEND: "b",
|
|
JD_SERIAL_CMD_RECEIVED: "b"
|
|
}
|