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

#include "config.h"

#include <glib.h>

#include "fu-cfi-struct.h"

#ifdef G_LOG_DOMAIN
  #undef G_LOG_DOMAIN
#endif
#define G_LOG_DOMAIN "FuStruct"

/**
 * fu_cfi_device_cmd_to_string:
 * @val: value, e.g. %FU_CFI_DEVICE_CMD_PAGE_PROG
 *
 * Converts an enumerated value to a string.
 *
 * Returns: identifier string
 **/
const gchar *
fu_cfi_device_cmd_to_string(FuCfiDeviceCmd val)
{
    if (val == FU_CFI_DEVICE_CMD_READ_ID)
        return "read-id";
    if (val == FU_CFI_DEVICE_CMD_PAGE_PROG)
        return "page-prog";
    if (val == FU_CFI_DEVICE_CMD_CHIP_ERASE)
        return "chip-erase";
    if (val == FU_CFI_DEVICE_CMD_READ_DATA)
        return "read-data";
    if (val == FU_CFI_DEVICE_CMD_READ_STATUS)
        return "read-status";
    if (val == FU_CFI_DEVICE_CMD_SECTOR_ERASE)
        return "sector-erase";
    if (val == FU_CFI_DEVICE_CMD_WRITE_EN)
        return "write-en";
    if (val == FU_CFI_DEVICE_CMD_WRITE_STATUS)
        return "write-status";
    if (val == FU_CFI_DEVICE_CMD_BLOCK_ERASE)
        return "block-erase";
    if (val == FU_CFI_DEVICE_CMD_RELEASE_PD)
        return "release-pd";
    return NULL;
}
