# Autogenerated constants for Magnetic field level service
from enum import IntEnum
from jacdac.constants import *
from jacdac.system.constants import *
JD_SERVICE_CLASS_MAGNETIC_FIELD_LEVEL = const(0x12fe180f)


class MagneticFieldLevelVariant(IntEnum):
    ANALOG_NS = const(0x1)
    ANALOG_N = const(0x2)
    ANALOG_S = const(0x3)
    DIGITAL_NS = const(0x4)
    DIGITAL_N = const(0x5)
    DIGITAL_S = const(0x6)


JD_MAGNETIC_FIELD_LEVEL_REG_STRENGTH = const(JD_REG_READING)
JD_MAGNETIC_FIELD_LEVEL_REG_DETECTED = const(0x181)
JD_MAGNETIC_FIELD_LEVEL_REG_VARIANT = const(JD_REG_VARIANT)
JD_MAGNETIC_FIELD_LEVEL_EV_ACTIVE = const(JD_EV_ACTIVE)
JD_MAGNETIC_FIELD_LEVEL_EV_INACTIVE = const(JD_EV_INACTIVE)
JD_MAGNETIC_FIELD_LEVEL_PACK_FORMATS = {
    JD_MAGNETIC_FIELD_LEVEL_REG_STRENGTH: "i1.15",
    JD_MAGNETIC_FIELD_LEVEL_REG_DETECTED: "u8",
    JD_MAGNETIC_FIELD_LEVEL_REG_VARIANT: "u8"
}
