<commit_before>/*
 * Copyright (C) 2018 <NAME> <<EMAIL>>
 *
 * This file is subject to the terms and conditions of the GNU Lesser General
 * Public License v2.1. See the file LICENSE in the top level directory for
 * more details.
 */
/**
 * @defgroup    usb   USB
 * @ingroup     sys
 * @brief       Configuration defines for USB peripheral devices.
 * @{
 *
 * @file
 * @brief       Definition of global compile time configuration options
 *
 * @author      <NAME> <<EMAIL>>
 */

#ifndef USB_H
#define USB_H

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @brief USB peripheral device vendor ID
 *
 * @note You must provide your own VID/PID combination when manufacturing a
 * device with USB.
 */
#ifndef USB_CONFIG_VID
#ifdef DOXYGEN
#define USB_CONFIG_VID
#else
#error  Please supply your vendor ID by setting USB_CONFIG_VID
#endif
#endif

/**
 * @brief USB peripheral device product ID
 *
 * @note You must provide your own VID/PID combination when manufacturing a
 * device with USB.
 */
#ifndef USB_CONFIG_PID
#ifdef DOXYGEN
#define USB_CONFIG_PID
#else
#error  Please supply your vendor ID by setting USB_CONFIG_PID
#endif
#endif

/**
 * @brief USB peripheral manufacturer string
 */
#ifndef USB_CONFIG_MANUF_STR
#define USB_CONFIG_MANUF_STR   "RIOT-os.org"
#endif

/**
 * @brief USB peripheral product string
 */
#ifndef USB_CONFIG_PRODUCT_STR
#define USB_CONFIG_PRODUCT_STR  "USB device"
#endif

/**
 * @brief USB peripheral configuration string
 */
#ifndef USB_CONFIG_CONFIGURATION_STR
#define USB_CONFIG_CONFIGURATION_STR    "USB config"
#endif

/**
 * @brief USB peripheral device version
 *
 * This is the version number of this peripheral
 * @note Not to be be confused with the USB version number
 */
#ifndef USB_CONFIG_PRODUCT_BCDVERSION
#define USB_CONFIG_PRODUCT_BCDVERSION   0x0100
#endif

/**
 * @brief USB specification version
 */
#ifndef USB_CONFIG_SPEC_BCDVERSION
#define USB_CONFIG_SPEC_BCDVERSION      0x0200
#endif

/**
 * @brief USB peripheral setting to indicate self powered devices.
 */
#ifndef USB_CONFIG_SELF_POWERED
#define USB_CONFIG_SELF_POWERED   (0)
#endif

/**
 * @brief USB device max power draw in mA, between 0 and 500mA
 */
#ifndef USB_CONFIG_MAX_POWER
#define USB_CONFIG_MAX_POWER   (100)
#endif

/**
 * @brief Default LANG ID reported to the host
 */
#ifndef USB_CONFIG_DEFAULT_LANGID
#define USB_CONFIG_DEFAULT_LANGID   0x0409 /* EN-US */
#endif

/**
 * @brief USB version definitions
 */
typedef enum {
    USB_VERSION_1x,     /* USB 1.0 or 1.1 device    */
    USB_VERSION_20,     /* USB 2.0 device           */
} usb_version_t;

/**
 * @brief USB speed definitions
 */
typedef enum {
    USB_SPEED_LOW,      /* Low speed (1.5Mbit/s)    */
    USB_SPEED_FULL,     /* Full speed (12Mbit/s)    */
    USB_SPEED_HIGH,     /* High speed (480Mbit/s)   */
} usb_speed_t;

/**
 * @brief USB endpoint types
 */
typedef enum {
    USB_EP_TYPE_NONE = 0,       /**< Unused endpoint    */
    USB_EP_TYPE_CONTROL,        /**< Control type       */
    USB_EP_TYPE_INTERRUPT,      /**< Interrupt type     */
    USB_EP_TYPE_BULK,           /**< Bulk type          */
    USB_EP_TYPE_ISOCHRONOUS,    /**< Isochronous type   */
} usb_ep_type_t;

/**<commit_msg>usb: Add configs to compile time configuration Doxygen group<commit_after>/*
 * Copyright (C) 2018 <NAME> <<EMAIL>>
 *
 * This file is subject to the terms and conditions of the GNU Lesser General
 * Public License v2.1. See the file LICENSE in the top level directory for
 * more details.
 */
/**
 * @defgroup    usb   USB
 * @ingroup     sys
 * @brief       Configuration defines for USB peripheral devices.
 * @{
 *
 * @file
 * @brief       Definition of global compile time configuration options
 *
 * @author      <NAME> <<EMAIL>>
 */

#ifndef USB_H
#define USB_H

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @defgroup usb_conf USB peripheral compile time configurations
 * @ingroup config
 * @{
 */
/**
 * @brief USB peripheral device vendor ID
 *
 * @note You must provide your own VID/PID combination when manufacturing a
 * device with USB.
 */
#ifndef USB_CONFIG_VID
#ifdef DOXYGEN
#define USB_CONFIG_VID
#else
#error  Please supply your vendor ID by setting USB_CONFIG_VID
#endif
#endif

/**
 * @brief USB peripheral device product ID
 *
 * @note You must provide your own VID/PID combination when manufacturing a
 * device with USB.
 */
#ifndef USB_CONFIG_PID
#ifdef DOXYGEN
#define USB_CONFIG_PID
#else
#error  Please supply your vendor ID by setting USB_CONFIG_PID
#endif
#endif

/**
 * @brief USB peripheral manufacturer string
 */
#ifndef USB_CONFIG_MANUF_STR
#define USB_CONFIG_MANUF_STR   "RIOT-os.org"
#endif

/**
 * @brief USB peripheral product string
 */
#ifndef USB_CONFIG_PRODUCT_STR
#define USB_CONFIG_PRODUCT_STR  "USB device"
#endif

/**
 * @brief USB peripheral configuration string
 */
#ifndef USB_CONFIG_CONFIGURATION_STR
#define USB_CONFIG_CONFIGURATION_STR    "USB config"
#endif

/**
 * @brief USB peripheral device version
 *
 * This is the version number of this peripheral
 * @note Not to be be confused with the USB version number
 */
#ifndef USB_CONFIG_PRODUCT_BCDVERSION
#define USB_CONFIG_PRODUCT_BCDVERSION   0x0100
#endif

/**
 * @brief USB specification version
 */
#ifndef USB_CONFIG_SPEC_BCDVERSION
#define USB_CONFIG_SPEC_BCDVERSION      0x0200
#endif

/**
 * @brief USB peripheral setting to indicate self powered devices.
 */
#ifndef USB_CONFIG_SELF_POWERED
#define USB_CONFIG_SELF_POWERED   (0)
#endif

/**
 * @brief USB device max power draw in mA, between 0 and 500mA
 */
#ifndef USB_CONFIG_MAX_POWER
#define USB_CONFIG_MAX_POWER   (100)
#endif

/**
 * @brief Default LANG ID reported to the host
 */
#ifndef USB_CONFIG_DEFAULT_LANGID
#define USB_CONFIG_DEFAULT_LANGID   0x0409 /* EN-US */
#endif
/** @} */

/**
 * @brief USB version definitions
 */
typedef enum {
    USB_VERSION_1x,     /* USB 1.0 or 1.1 device    */
    USB_VERSION_20,     /* USB 2.0 device           */
} usb_version_t;

/**
 * @brief USB speed definitions
 */
typedef enum {
    USB_SPEED_LOW,      /* Low speed (1.5Mbit/s)    */
    USB_SPEED_FULL,     /* Full speed (12Mbit/s)    */
    USB_SPEED_HIGH,     /* High speed (480Mbit/s)   */
} usb_speed_t;

/**
 * @brief USB endpoint types
 */
typedef enum {
    USB_EP_TYPE_NONE = 0,       /**< Unused endpoint    */
    USB_EP_TYPE_CONTROL,        /**< Control type       */
    USB_EP_TYPE_INTERRUPT,      /**< Interrupt type     */
    USB_EP_TYPE_BULK,           /**< Bulk type          */
    USB_EP_TYPE_ISOCHRONOUS,    /**< Isochronous type   */
} usb_ep_type_t;

/**
{'fraction_non_alphanumeric': 0.09744921338017412, 'fraction_numerical': 0.014052237666106613, 'mean_word_length': 3.293770491803279, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7012565', 'n_tokens_mistral': 2202, 'n_tokens_neox': 2105, 'n_words': 669}