"""serialx serial port implementation."""

from .async_serial import (
    AsyncSerial,
    SerialStreamWriter,
    async_serial_for_url,
    create_serial_connection,
    open_serial_connection,
)
from .common import (
    AllConnectKwargs,
    BaseSerial,
    BaseSerialTransport,
    ConnectKwargs,
    ModemPins,
    Parity,
    PinState,
    Platform,
    SerialException,
    SerialPortInfo,
    StopBits,
    UnsupportedSetting,
    async_list_serial_ports,
    get_serial_classes,
    list_serial_ports,
    register_uri_handler,
    serial_for_url,
)
from .compat import (
    CR,
    EIGHTBITS,
    FIVEBITS,
    LF,
    PARITY_EVEN,
    PARITY_MARK,
    PARITY_NONE,
    PARITY_ODD,
    PARITY_SPACE,
    SEVENBITS,
    SIXBITS,
    STOPBITS_ONE,
    STOPBITS_ONE_POINT_FIVE,
    STOPBITS_TWO,
    SerialTimeoutException,
)
from .platforms import Serial, SerialTransport

__all__ = [
    "AsyncSerial",
    "async_serial_for_url",
    "create_serial_connection",
    "get_serial_classes",
    "list_serial_ports",
    "async_list_serial_ports",
    "open_serial_connection",
    "register_uri_handler",
    "serial_for_url",
    "ModemPins",
    "Parity",
    "PinState",
    "Platform",
    "AllConnectKwargs",
    "BaseSerial",
    "BaseSerialTransport",
    "ConnectKwargs",
    "Serial",
    "SerialException",
    "UnsupportedSetting",
    "SerialPortInfo",
    "SerialStreamWriter",
    "SerialTransport",
    "StopBits",
    # Compatibility with pyserial
    "SerialTimeoutException",
    "FIVEBITS",
    "SIXBITS",
    "SEVENBITS",
    "EIGHTBITS",
    "PARITY_NONE",
    "PARITY_EVEN",
    "PARITY_ODD",
    "PARITY_MARK",
    "PARITY_SPACE",
    "STOPBITS_ONE",
    "STOPBITS_ONE_POINT_FIVE",
    "STOPBITS_TWO",
    "CR",
    "LF",
]
