#ifndef VMF_NNM_IPC_CMD_H
#define VMF_NNM_IPC_CMD_H

#pragma once

#include <stdint.h>
#include <stdbool.h>

// below are for usb control trasnfer
enum
{
    KDP2_CONTROL_REBOOT = 0xFF,                 // chip reboot
    KDP2_CONTROL_SHUTDOWN = 0xFE,               // chip shut down
    KDP2_CONTROL_FIFOQ_RESET = 0x80,            // make fifo queue clean and start-over
    KDP2_CONTROL_FIFOQ_GET_STATUS = 0x81,       // make firmware print fifoq status (debug only)
    KDP2_CONTROL_FIFOQ_CONFIGURE = 0x82,        // configure FIFO Queue buffer size and queue depth
    KDP2_CONTROL_FIFOQ_ENABLE_DROPPABLE = 0x83, // enable/disable droppable inference image attribute (default : disabled)
    KDP2_CONTROL_DDR_HEAP_BOUNDARY_ADJUST = 0x84, // adjust the boundary address of the ddr heap
    KDP2_CONTROL_REBOOT_SYSTEM = 0x85,          // reboot the entire system (KL630 only)
};

// below are for firmware serial number
enum kp_firmware_serial_t
{
    KP_KDP_FW = 0x01,                               /**< 00000001 */

    /* ======================= Kdp2 Legacy ========================== */

    KP_KDP2_FW = 0x80,                              /**< 1******* */

    KP_KDP2_FW_USB_TYPE = 0x80,                     /**< 1*****00 */
    KP_KDP2_FW_FLASH_TYPE = 0x81,                   /**< 1*****01 */
    KP_KDP2_FW_JTAG_TYPE = 0x82,                    /**< 1*****10 */
    KP_KDP2_FW_LOADER = 0x83,                       /**< 1*****11 */
    KP_KDP2_FW_FIND_TYPE_MASK = 0x83,               /**< 10000011 */

    KP_KDP2_FW_KL720_USB_DFU = 0x101,               /**< 000100000001 Special Case */
    KP_KDP2_FW_KL720_LOADER = 0xBA,                 /**< 10111010 Special Case */

    KP_KDP2_FW_HOST_MODE = 0x90,                    /**< 1001**** */
    KP_KDP2_FW_HICO_MODE = 0xA0,                    /**< 1010**** */
    KP_KDP2_FW_COMPANION_MODE = 0xB0,               /**< 1011**** */
    KP_KDP2_FW_FIND_MODE_MASK = 0xF0,               /**< 11110000 */

    /* ============================================================== */

    KP_KDP2_FW_V2 = 0x400,                          /**< 01********** */

    KP_KDP2_FW_USB_TYPE_V2 = 0x400,                 /**< 01*******000 */
    KP_KDP2_FW_FLASH_TYPE_V2 = 0x401,               /**< 01*******001 */
    KP_KDP2_FW_JTAG_TYPE_V2 = 0x402,                /**< 01*******010 */
    KP_KDP2_FW_LOADER_V2 = 0x403,                   /**< 01*******011 */
    KP_KDP2_FW_FIND_TYPE_MASK_V2 = 0x407,           /**< 010000000111 */

    KP_KDP2_FW_HOST_MODE_V2 = 0x410,                /**< 01***001**** */
    KP_KDP2_FW_HICO_MODE_V2 = 0x420,                /**< 01***010**** */
    KP_KDP2_FW_COMPANION_MODE_V2 = 0x430,           /**< 01***011**** */
    KP_KDP2_FW_FIND_MODE_MASK_V2 = 0x470,           /**< 010001110000 */

    KP_KDP2_FW_RTOS_OS_V2 = 0x500,                  /**< 0101******** */
    KP_KDP2_FW_LINUX_OS_V2 = 0x600,                 /**< 0110******** */
    KP_KDP2_FW_FIND_OS_MASK_V2 = 0x700,             /**< 011100000000 */
};

#endif
