/*!
 * @file        usbd_winusb_vcp.h
 *
 * @brief       usb device WINUSB class VCP handler header file
 *
 * @version     V1.0.0
 *
 * @date        2025-02-15
 *
 * @attention
 *
 *  Copyright (C) 2025 Geehy Semiconductor
 *
 *  You may not use this file except in compliance with the
 *  GEEHY COPYRIGHT NOTICE (GEEHY SOFTWARE PACKAGE LICENSE).
 *
 *  The program is only for reference, which is distributed in the hope
 *  that it will be useful and instructional for customers to develop
 *  their software. Unless required by applicable law or agreed to in
 *  writing, the program is distributed on an "AS IS" BASIS, WITHOUT
 *  ANY WARRANTY OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the GEEHY SOFTWARE PACKAGE LICENSE for the governing permissions
 *  and limitations under the License.
 */

/* Define to prevent recursive inclusion */
#ifndef USBD_WINUSB_VCP_H
#define USBD_WINUSB_VCP_H

#ifdef __cplusplus
  extern "C" {
#endif

/* Includes ***************************************************************/
#include "usbd_winusb.h"

/* Exported macro *********************************************************/
#define USBD_WINUSB_TX_BUF_LEN         1024
#define USBD_WINUSB_RX_BUF_LEN         1024

/* Exported typedef *******************************************************/

/**
 * @brief   USB device WINUSB VCP status
 */
typedef enum
{
    USBD_WINUSB_VCP_IDLE,
    USBD_WINUSB_VCP_REV_UPDATE,
} USBD_WINUSB_VCP_STA_T;

/**
 * @brief   USB device WINUSB VCP information
 */
typedef struct
{
    uint32_t    rxUpdateLen;
    uint8_t     state;
} USBD_WINUSB_VCP_INFO_T;

/**@} end of group OTGD_WINUSB_Variables*/

/* Exported function prototypes *******************************************/

USBD_STA_T USBD_HS_WINUSB_ItfInit(void);
USBD_STA_T USBD_HS_WINUSB_ItfDeInit(void);
USBD_STA_T USBD_HS_WINUSB_ItfCtrl(uint8_t command, uint8_t *buffer, uint16_t length);
USBD_STA_T USBD_HS_WINUSB_ItfSend(uint8_t *buffer, uint16_t length);
USBD_STA_T USBD_HS_WINUSB_ItfSendEnd(uint8_t epNum, uint8_t *buffer, uint32_t *length);
USBD_STA_T USBD_HS_WINUSB_ItfReceive(uint8_t *buffer, uint32_t *length);

#ifdef __cplusplus
}
#endif

#endif /* USBD_WINUSB_VCP_H */
