# Statuses
OK = 0
INVALID_HANDLE = 1
DEVICE_NOT_FOUND = 2
DEVICE_NOT_OPENED = 3
IO_ERROR = 4
INSUFFICIENT_RESOURCES = 5
INVALID_PARAMETER = 6
INVALID_BAUD_RATE = 7
DEVICE_NOT_OPENED_FOR_ERASE = 8
DEVICE_NOT_OPENED_FOR_WRITE = 9
FAILED_TO_WRITE_DEVICE = 10
EEPROM_READ_FAILED = 11
EEPROM_WRITE_FAILED = 12
EEPROM_ERASE_FAILED = 13
EEPROM_NOT_PRESENT = 14
EEPROM_NOT_PROGRAMMED = 15
INVALID_ARGS = 16
NOT_SUPPORTED = 17
OTHER_ERROR = 18

# List Devices flags
LIST_NUMBER_ONLY = 0x80000000
LIST_BY_INDEX = 0x40000000
LIST_ALL = 0x20000000

# OpenEx flags
OPEN_BY_SERIAL_NUMBER = 1
OPEN_BY_DESCRIPTION = 2
OPEN_BY_LOCATION = 4

# Device Identifiers
DEVICE_232BM = 0
DEVICE_232AM = 1
DEVICE_100AX = 2
DEVICE_UNKNOWN = 3
DEVICE_2232C = 4
DEVICE_232R = 5
DEVICE_2232H = 6
DEVICE_4232H = 7
DEVICE_232H = 8
DEVICE_X_SERIES = 9

# Driver Types
DRIVER_TYPE_D2XX = 0
DRIVER_TYPE_VCP = 1

# Word Lengths
BITS_8 = 8
BITS_7 = 7

# Stop Bits
STOP_BITS_1 = 0
STOP_BITS_2 = 2

# Parity
PARITY_NONE = 0
PARITY_ODD = 1
PARITY_EVEN = 2
PARITY_MARK = 3
PARITY_SPACE = 4

# Flow Control
FLOW_NONE = 0x0000
FLOW_RTS_CTS = 0x0100
FLOW_DTR_DSR = 0x0200
FLOW_XON_XOFF = 0x0400

# Purge RX and TX Buffers
PURGE_RX = 1
PURGE_TX = 2

# Notification Events
EVENT_RXCHAR = 1
EVENT_MODEM_STATUS = 2
EVENT_LINE_STATUS = 4

MAX_DESCRIPTION_SIZE = 256
