/*
 * This file is auto-generated, do not modify!
 *
 * SPDX-License-Identifier: LGPL-2.1-or-later
 */

#pragma once
#include <fu-input-stream.h>
/**
 * FuRts54hubRtd21xxIspStatus:
 */
typedef enum {
    /**
     * FU_RTS54HUB_RTD21XX_ISP_STATUS_BUSY:
     *
     * host must wait for device
     */
    FU_RTS54HUB_RTD21XX_ISP_STATUS_BUSY = 0xbb,
    /**
     * FU_RTS54HUB_RTD21XX_ISP_STATUS_IDLE_SUCCESS:
     *
     * previous command was OK
     */
    FU_RTS54HUB_RTD21XX_ISP_STATUS_IDLE_SUCCESS = 0x11,
    /**
     * FU_RTS54HUB_RTD21XX_ISP_STATUS_IDLE_FAILURE:
     *
     * previous command failed
     */
    FU_RTS54HUB_RTD21XX_ISP_STATUS_IDLE_FAILURE = 0x12,
}  FuRts54hubRtd21xxIspStatus;
/**
 * FuRts54hubI2cSpeed:
 */
typedef enum {
    /**
     * FU_RTS54HUB_I2C_SPEED_100K:
     */
    FU_RTS54HUB_I2C_SPEED_100K,
    /**
     * FU_RTS54HUB_I2C_SPEED_200K:
     */
    FU_RTS54HUB_I2C_SPEED_200K,
    /**
     * FU_RTS54HUB_I2C_SPEED_300K:
     */
    FU_RTS54HUB_I2C_SPEED_300K,
    /**
     * FU_RTS54HUB_I2C_SPEED_400K:
     */
    FU_RTS54HUB_I2C_SPEED_400K,
    /**
     * FU_RTS54HUB_I2C_SPEED_500K:
     */
    FU_RTS54HUB_I2C_SPEED_500K,
    /**
     * FU_RTS54HUB_I2C_SPEED_600K:
     */
    FU_RTS54HUB_I2C_SPEED_600K,
    /**
     * FU_RTS54HUB_I2C_SPEED_700K:
     */
    FU_RTS54HUB_I2C_SPEED_700K,
    /**
     * FU_RTS54HUB_I2C_SPEED_800K:
     */
    FU_RTS54HUB_I2C_SPEED_800K,
}  FuRts54hubI2cSpeed;
#define FU_RTS54HUB_I2C_SPEED_LAST 8
/**
 * FuRts54hubVendorCmd:
 */
typedef enum {
    /**
     * FU_RTS54HUB_VENDOR_CMD_NONE:
     */
    FU_RTS54HUB_VENDOR_CMD_NONE = 0,
    /**
     * FU_RTS54HUB_VENDOR_CMD_ENABLE:
     */
    FU_RTS54HUB_VENDOR_CMD_ENABLE = 1 << 0,
    /**
     * FU_RTS54HUB_VENDOR_CMD_ACCESS_FLASH:
     */
    FU_RTS54HUB_VENDOR_CMD_ACCESS_FLASH = 1 << 1,
} G_GNUC_FLAG_ENUM FuRts54hubVendorCmd;
gchar *fu_rts54hub_vendor_cmd_to_string(FuRts54hubVendorCmd val) G_GNUC_CONST;
/**
 * FuRts54hubRtd21xxBgIspCmd:
 */
typedef enum {
    /**
     * FU_RTS54HUB_RTD21XX_BG_ISP_CMD_NONE:
     */
    FU_RTS54HUB_RTD21XX_BG_ISP_CMD_NONE,
    /**
     * FU_RTS54HUB_RTD21XX_BG_ISP_CMD_FW_UPDATE_START:
     */
    FU_RTS54HUB_RTD21XX_BG_ISP_CMD_FW_UPDATE_START,
    /**
     * FU_RTS54HUB_RTD21XX_BG_ISP_CMD_FW_UPDATE_ISP_DONE:
     */
    FU_RTS54HUB_RTD21XX_BG_ISP_CMD_FW_UPDATE_ISP_DONE,
    /**
     * FU_RTS54HUB_RTD21XX_BG_ISP_CMD_GET_FW_INFO:
     */
    FU_RTS54HUB_RTD21XX_BG_ISP_CMD_GET_FW_INFO,
    /**
     * FU_RTS54HUB_RTD21XX_BG_ISP_CMD_FW_UPDATE_EXIT:
     */
    FU_RTS54HUB_RTD21XX_BG_ISP_CMD_FW_UPDATE_EXIT,
    /**
     * FU_RTS54HUB_RTD21XX_BG_ISP_CMD_GET_PROJECT_ID_ADDR:
     */
    FU_RTS54HUB_RTD21XX_BG_ISP_CMD_GET_PROJECT_ID_ADDR,
    /**
     * FU_RTS54HUB_RTD21XX_BG_ISP_CMD_SYNC_IDENTIFY_CODE:
     */
    FU_RTS54HUB_RTD21XX_BG_ISP_CMD_SYNC_IDENTIFY_CODE,
}  FuRts54hubRtd21xxBgIspCmd;
#define FU_RTS54HUB_RTD21XX_BG_ISP_CMD_LAST 7
/**
 * FuRts54hubRtd21xxFgIspCmd:
 */
typedef enum {
    /**
     * FU_RTS54HUB_RTD21XX_FG_ISP_CMD_NONE:
     */
    FU_RTS54HUB_RTD21XX_FG_ISP_CMD_NONE,
    /**
     * FU_RTS54HUB_RTD21XX_FG_ISP_CMD_ENTER_FW_UPDATE:
     */
    FU_RTS54HUB_RTD21XX_FG_ISP_CMD_ENTER_FW_UPDATE,
    /**
     * FU_RTS54HUB_RTD21XX_FG_ISP_CMD_GET_PROJECT_ID_ADDR:
     */
    FU_RTS54HUB_RTD21XX_FG_ISP_CMD_GET_PROJECT_ID_ADDR,
    /**
     * FU_RTS54HUB_RTD21XX_FG_ISP_CMD_SYNC_IDENTIFY_CODE:
     */
    FU_RTS54HUB_RTD21XX_FG_ISP_CMD_SYNC_IDENTIFY_CODE,
    /**
     * FU_RTS54HUB_RTD21XX_FG_ISP_CMD_GET_FW_INFO:
     */
    FU_RTS54HUB_RTD21XX_FG_ISP_CMD_GET_FW_INFO,
    /**
     * FU_RTS54HUB_RTD21XX_FG_ISP_CMD_FW_UPDATE_START:
     */
    FU_RTS54HUB_RTD21XX_FG_ISP_CMD_FW_UPDATE_START,
    /**
     * FU_RTS54HUB_RTD21XX_FG_ISP_CMD_FW_UPDATE_ISP_DONE:
     */
    FU_RTS54HUB_RTD21XX_FG_ISP_CMD_FW_UPDATE_ISP_DONE,
    /**
     * FU_RTS54HUB_RTD21XX_FG_ISP_CMD_FW_UPDATE_RESET:
     */
    FU_RTS54HUB_RTD21XX_FG_ISP_CMD_FW_UPDATE_RESET,
    /**
     * FU_RTS54HUB_RTD21XX_FG_ISP_CMD_FW_UPDATE_EXIT:
     */
    FU_RTS54HUB_RTD21XX_FG_ISP_CMD_FW_UPDATE_EXIT,
}  FuRts54hubRtd21xxFgIspCmd;
#define FU_RTS54HUB_RTD21XX_FG_ISP_CMD_LAST 9
/**
 * FuRts54HubMergeInfoDdcciOpcode:
 */
typedef enum {
    /**
     * FU_RTS54_HUB_MERGE_INFO_DDCCI_OPCODE_COMMUNICATION:
     */
    FU_RTS54_HUB_MERGE_INFO_DDCCI_OPCODE_COMMUNICATION = 0x11,
    /**
     * FU_RTS54_HUB_MERGE_INFO_DDCCI_OPCODE_DDCCI_TO_DEBUG:
     */
    FU_RTS54_HUB_MERGE_INFO_DDCCI_OPCODE_DDCCI_TO_DEBUG = 0x55,
    /**
     * FU_RTS54_HUB_MERGE_INFO_DDCCI_OPCODE_FIRST:
     */
    FU_RTS54_HUB_MERGE_INFO_DDCCI_OPCODE_FIRST = 0x77,
    /**
     * FU_RTS54_HUB_MERGE_INFO_DDCCI_OPCODE_GET_VERSION:
     */
    FU_RTS54_HUB_MERGE_INFO_DDCCI_OPCODE_GET_VERSION = 0x99,
    /**
     * FU_RTS54_HUB_MERGE_INFO_DDCCI_OPCODE_SET_VERSION:
     */
    FU_RTS54_HUB_MERGE_INFO_DDCCI_OPCODE_SET_VERSION = 0xBB,
}  FuRts54HubMergeInfoDdcciOpcode;
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructRts54HubDdcPkt;

FuStructRts54HubDdcPkt *fu_struct_rts54_hub_ddc_pkt_ref(FuStructRts54HubDdcPkt *st) G_GNUC_NON_NULL(1);
void fu_struct_rts54_hub_ddc_pkt_unref(FuStructRts54HubDdcPkt *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructRts54HubDdcPkt, fu_struct_rts54_hub_ddc_pkt_unref)
FuStructRts54HubDdcPkt *fu_struct_rts54_hub_ddc_pkt_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_rts54_hub_ddc_pkt_set_first_opcode(FuStructRts54HubDdcPkt *st, FuRts54HubMergeInfoDdcciOpcode value) G_GNUC_NON_NULL(1);
void fu_struct_rts54_hub_ddc_pkt_set_second_opcode(FuStructRts54HubDdcPkt *st, guint8 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_RTS54_HUB_DDC_PKT_OFFSET_FIRST_OPCODE 0x0
#define FU_STRUCT_RTS54_HUB_DDC_PKT_OFFSET_SECOND_OPCODE 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_RTS54_HUB_DDC_PKT_SIZE 0x2
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_RTS54_HUB_DDC_PKT_DEFAULT_FIRST_OPCODE FU_RTS54_HUB_MERGE_INFO_DDCCI_OPCODE_FIRST
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructRts54HubDdcWriteMergeInfoPkt;

FuStructRts54HubDdcWriteMergeInfoPkt *fu_struct_rts54_hub_ddc_write_merge_info_pkt_ref(FuStructRts54HubDdcWriteMergeInfoPkt *st) G_GNUC_NON_NULL(1);
void fu_struct_rts54_hub_ddc_write_merge_info_pkt_unref(FuStructRts54HubDdcWriteMergeInfoPkt *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructRts54HubDdcWriteMergeInfoPkt, fu_struct_rts54_hub_ddc_write_merge_info_pkt_unref)
FuStructRts54HubDdcWriteMergeInfoPkt *fu_struct_rts54_hub_ddc_write_merge_info_pkt_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_rts54_hub_ddc_write_merge_info_pkt_set_first_opcode(FuStructRts54HubDdcWriteMergeInfoPkt *st, FuRts54HubMergeInfoDdcciOpcode value) G_GNUC_NON_NULL(1);
void fu_struct_rts54_hub_ddc_write_merge_info_pkt_set_second_opcode(FuStructRts54HubDdcWriteMergeInfoPkt *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_rts54_hub_ddc_write_merge_info_pkt_set_major_version(FuStructRts54HubDdcWriteMergeInfoPkt *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_rts54_hub_ddc_write_merge_info_pkt_set_minor_version(FuStructRts54HubDdcWriteMergeInfoPkt *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_rts54_hub_ddc_write_merge_info_pkt_set_patch_version(FuStructRts54HubDdcWriteMergeInfoPkt *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_rts54_hub_ddc_write_merge_info_pkt_set_build_version(FuStructRts54HubDdcWriteMergeInfoPkt *st, guint8 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_RTS54_HUB_DDC_WRITE_MERGE_INFO_PKT_OFFSET_FIRST_OPCODE 0x0
#define FU_STRUCT_RTS54_HUB_DDC_WRITE_MERGE_INFO_PKT_OFFSET_SECOND_OPCODE 0x1
#define FU_STRUCT_RTS54_HUB_DDC_WRITE_MERGE_INFO_PKT_OFFSET_MAJOR_VERSION 0x2
#define FU_STRUCT_RTS54_HUB_DDC_WRITE_MERGE_INFO_PKT_OFFSET_MINOR_VERSION 0x3
#define FU_STRUCT_RTS54_HUB_DDC_WRITE_MERGE_INFO_PKT_OFFSET_PATCH_VERSION 0x4
#define FU_STRUCT_RTS54_HUB_DDC_WRITE_MERGE_INFO_PKT_OFFSET_BUILD_VERSION 0x5
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_RTS54_HUB_DDC_WRITE_MERGE_INFO_PKT_SIZE 0x6
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_RTS54_HUB_DDC_WRITE_MERGE_INFO_PKT_DEFAULT_FIRST_OPCODE FU_RTS54_HUB_MERGE_INFO_DDCCI_OPCODE_FIRST
#endif
