# Autogenerated constants for Light level service
from enum import IntEnum
from jacdac.constants import *
from jacdac.system.constants import *
JD_SERVICE_CLASS_LIGHT_LEVEL = const(0x17dc9a1c)


class LightLevelVariant(IntEnum):
    PHOTO_RESISTOR = const(0x1)
    REVERSE_BIASED_LED = const(0x2)


JD_LIGHT_LEVEL_REG_LIGHT_LEVEL = const(JD_REG_READING)
JD_LIGHT_LEVEL_REG_LIGHT_LEVEL_ERROR = const(JD_REG_READING_ERROR)
JD_LIGHT_LEVEL_REG_VARIANT = const(JD_REG_VARIANT)
JD_LIGHT_LEVEL_PACK_FORMATS = {
    JD_LIGHT_LEVEL_REG_LIGHT_LEVEL: "u0.16",
    JD_LIGHT_LEVEL_REG_LIGHT_LEVEL_ERROR: "u0.16",
    JD_LIGHT_LEVEL_REG_VARIANT: "u8"
}
