#include "usb_printer_desc.h"

#if USB_DEVICE_TYPE & BIT(4)

AT(.usbdev.com.table)
const u8 desc_config_printer[DEV_CFG_DESC_SIZE] = {
    0x09,
    USB_DESC_TYPE_CFG,
    L_BYTE(DEV_CFG_DESC_SIZE),
    H_BYTE(DEV_CFG_DESC_SIZE),
    0x01,
    0x01,
    0x00,
    0xc0,
    0x00,

    0x09,
    USB_DESC_TYPE_IF,
    0x00,
    0x00,
    0x02,
    0x07,
    0x01,
    0x02,
    0x04,

    0x07,
    USB_DESC_TYPE_EP,
    USB_DEV_IN_EP | 0x80,
    0x02,
    L_BYTE(EP_IN_MAX_SIZE),
    H_BYTE(EP_IN_MAX_SIZE),
    0x00,

    0x07,
    USB_DESC_TYPE_EP,
    USB_DEV_OUT_EP,
    0x02,
    L_BYTE(EP_OUT_MAX_SIZE),
    H_BYTE(EP_OUT_MAX_SIZE),
    0x00,
};

u8 *usb_get_config_descriptor(u8 *length)
{
    *length = sizeof(desc_config_printer);
    return (u8 *)desc_config_printer;
}

#endif // USB_DEVICE_TYPE & BIT(4)
