2021-01-28 15:26:56 +01:00
|
|
|
"""Constants for hardware."""
|
|
|
|
from enum import Enum
|
|
|
|
|
|
|
|
|
|
|
|
class UdevSubsystem(str, Enum):
|
|
|
|
"""Udev subsystem class."""
|
|
|
|
|
|
|
|
SERIAL = "tty"
|
|
|
|
USB = "usb"
|
|
|
|
INPUT = "input"
|
|
|
|
DISK = "block"
|
|
|
|
PCI = "pci"
|
|
|
|
AUDIO = "sound"
|
2021-01-29 11:28:16 +01:00
|
|
|
VIDEO = "video4linux"
|
|
|
|
MEDIA = "media"
|
2021-01-29 17:17:41 +01:00
|
|
|
GPIO = "gpio"
|
|
|
|
GPIOMEM = "gpiomem"
|
2021-01-29 11:28:16 +01:00
|
|
|
VCHIQ = "vchiq"
|
|
|
|
GRAPHICS = "graphics"
|
2021-03-01 14:57:44 +01:00
|
|
|
CEC = "cec"
|
2021-01-29 11:28:16 +01:00
|
|
|
DRM = "drm"
|
2021-03-01 14:57:44 +01:00
|
|
|
HIDRAW = "hidraw"
|
|
|
|
RPI_HEVCMEM = "rpivid-hevcmem"
|
|
|
|
RPI_H264MEM = "rpivid-h264mem"
|
2021-01-28 15:26:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
class PolicyGroup(str, Enum):
|
|
|
|
"""Policy groups backend."""
|
|
|
|
|
|
|
|
UART = "uart"
|
|
|
|
GPIO = "gpio"
|
|
|
|
USB = "usb"
|
|
|
|
VIDEO = "video"
|
|
|
|
AUDIO = "audio"
|
2021-02-16 08:40:19 +01:00
|
|
|
BLUETOOTH = "bluetooth"
|
2021-01-30 14:19:53 +01:00
|
|
|
|
|
|
|
|
2021-01-31 14:24:22 +01:00
|
|
|
class HardwareAction(str, Enum):
|
|
|
|
"""Hardware device action."""
|
2021-01-30 14:19:53 +01:00
|
|
|
|
|
|
|
ADD = "add"
|
|
|
|
REMOVE = "remove"
|
2021-01-31 14:24:22 +01:00
|
|
|
|
|
|
|
|
|
|
|
class UdevKernelAction(str, Enum):
|
|
|
|
"""Udev kernel device action."""
|
|
|
|
|
|
|
|
ADD = "add"
|
|
|
|
REMOVE = "remove"
|
|
|
|
CHANGE = "change"
|
|
|
|
BIND = "bind"
|
|
|
|
UNBIND = "unbind"
|