from enum import Enum


class Command(Enum):
    CMD_GET_SEC_VERSION = b"\xff"  # security version, returns \xff if security is off
    CMD_GET_BL_VER = b"\xfe"
    CMD_GET_HW_VER = b"\xfc"
    CMD_GET_HW_CODE = b"\xfd"
    CMD_SEND_DA = b"\xd7"
    CMD_JUMP_DA = b"\xd5"
    CMD_GET_TARGET_CONFIG = b"\xd8"
    CMD_READ16 = b"\xa2"
    CMD_WRITE16 = b"\xd2"
    CMD_READ32 = b"\xd1"
    CMD_WRITE32 = b"\xd4"
    CMD_PWR_INIT = b"\xc4"
    CMD_PWR_DEINIT = b"\xc5"
    CMD_PWR_READ16 = b"\xc6"
    CMD_PWR_WRITE16 = b"\xc7"
    CMD_SEND_IMAGE = b"\x70"
    CMD_BOOT_IMAGE = b"\x71"

    CMD_HANDSHAKE_BEGIN = b"\xa0"
    CMD_HANDSHAKE_STAGE2 = b"\x0a"
    CMD_HANDSHAKE_STAGE3 = b"\x50"
    CMD_HANDSHAKE_STAGE4 = b"\x05"
