#ifndef _USB_DESCRIPTOR_H_
#define _USB_DESCRIPTOR_H_
//----------------------------------------------------------------------------
///
/// \brief  USB device descriptor
///
///         See implementation files for further information.
//
/// \date   2018025
/// \author Maximilian Seesslen <mes@seesslen.net>
///
//----------------------------------------------------------------------------


//---Includes-----------------------------------------------------------------


//---Own------------------------------


#include <biwak/usb_defines.h>


//---Defines------------------------------------------------------------------


class CUsbDescriptor
{
public:
   CUsbDescriptor();
   uint8_t *getDeviceDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
   uint8_t *getLangIDStringDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
   uint8_t *getProductStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
   uint8_t *getManufacturerStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
   uint8_t *getSerialStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);

   void getString(uint8_t *desc, uint8_t *unicode, uint16_t *len);
   void getSerialNum(void);
   void intToUnicode (uint32_t value , uint8_t *pbuf , uint8_t len);
};


//---fin----------------------------------------------------------------------
#endif // ? ! _USB_H_
