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

#pragma once
#include <fu-input-stream.h>
/**
 * FuWchCh347CmdSpi:
 */
typedef enum {
    /**
     * FU_WCH_CH347_CMD_SPI_SET_CFG:
     */
    FU_WCH_CH347_CMD_SPI_SET_CFG = 0xC0,
    /**
     * FU_WCH_CH347_CMD_SPI_CS_CTRL:
     */
    FU_WCH_CH347_CMD_SPI_CS_CTRL = 0xC1,
    /**
     * FU_WCH_CH347_CMD_SPI_OUT_IN:
     */
    FU_WCH_CH347_CMD_SPI_OUT_IN = 0xC2,
    /**
     * FU_WCH_CH347_CMD_SPI_IN:
     */
    FU_WCH_CH347_CMD_SPI_IN = 0xC3,
    /**
     * FU_WCH_CH347_CMD_SPI_OUT:
     */
    FU_WCH_CH347_CMD_SPI_OUT = 0xC4,
    /**
     * FU_WCH_CH347_CMD_SPI_GET_CFG:
     */
    FU_WCH_CH347_CMD_SPI_GET_CFG = 0xCA,
}  FuWchCh347CmdSpi;
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructWchCh347Req;

FuStructWchCh347Req *fu_struct_wch_ch347_req_ref(FuStructWchCh347Req *st) G_GNUC_NON_NULL(1);
void fu_struct_wch_ch347_req_unref(FuStructWchCh347Req *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructWchCh347Req, fu_struct_wch_ch347_req_unref)
FuStructWchCh347Req *fu_struct_wch_ch347_req_new(void) G_GNUC_WARN_UNUSED_RESULT;
FuWchCh347CmdSpi fu_struct_wch_ch347_req_get_cmd(const FuStructWchCh347Req *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_wch_ch347_req_get_payloadsz(const FuStructWchCh347Req *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_wch_ch347_req_set_cmd(FuStructWchCh347Req *st, FuWchCh347CmdSpi value) G_GNUC_NON_NULL(1);
void fu_struct_wch_ch347_req_set_payloadsz(FuStructWchCh347Req *st, guint16 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_WCH_CH347_REQ_OFFSET_CMD 0x0
#define FU_STRUCT_WCH_CH347_REQ_OFFSET_PAYLOADSZ 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_WCH_CH347_REQ_SIZE 0x3
#endif

#ifndef __GI_SCANNER__
#endif
