#pragma once

#ifdef __cplusplus
extern "C" {
#endif

// ------------------------
// TinyUSB common
// ------------------------
#define CFG_TUSB_MCU                 OPT_MCU_ESP32S3
#define CFG_TUSB_OS                  OPT_OS_FREERTOS

// device mode only
#define CFG_TUSB_RHPORT0_MODE        (OPT_MODE_DEVICE | OPT_MODE_FULL_SPEED)

// ------------------------
// TinyUSB device
// ------------------------
#define CFG_TUD_ENABLED              1
#define CFG_TUD_MAX_SPEED            OPT_MODE_FULL_SPEED
#define CFG_TUD_ENDPOINT0_SIZE       64

// Enable MTP class
#define CFG_TUD_MTP                  1

// Endpoint buffer size for MTP
#define CFG_TUD_MTP_EP_BUFSIZE       512

// Device info macros used by mtp_device.h
#define CFG_TUD_MTP_DEVICEINFO_EXTENSIONS                 "microsoft.com: 1.0;"
#define CFG_TUD_MTP_DEVICEINFO_SUPPORTED_OPERATIONS       \
    MTP_OP_GET_DEVICE_INFO,                               \
    MTP_OP_OPEN_SESSION,                                  \
    MTP_OP_CLOSE_SESSION,                                 \
    MTP_OP_GET_STORAGE_IDS,                               \
    MTP_OP_GET_STORAGE_INFO,                              \
    MTP_OP_GET_NUM_OBJECTS,                               \
    MTP_OP_GET_OBJECT_HANDLES

#define CFG_TUD_MTP_DEVICEINFO_SUPPORTED_EVENTS
#define CFG_TUD_MTP_DEVICEINFO_SUPPORTED_DEVICE_PROPERTIES
#define CFG_TUD_MTP_DEVICEINFO_CAPTURE_FORMATS
#define CFG_TUD_MTP_DEVICEINFO_PLAYBACK_FORMATS           \
    MTP_OBJ_FORMAT_ASSOCIATION,                           \
    MTP_OBJ_FORMAT_TEXT

#ifdef __cplusplus
}
#endif