Skip to content

Commit

Permalink
Merge pull request RIOT-OS#12873 from leandrolanzieri/pr/usb_fix_config
Browse files Browse the repository at this point in the history
sys/usb: Add configurations to Doxygen configuration group
  • Loading branch information
bergzand authored Dec 5, 2019
2 parents 4e55f63 + 0673fce commit 1d223b5
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 7 deletions.
21 changes: 19 additions & 2 deletions sys/include/usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,38 @@
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
*
* You must provide your own VID/PID combination when manufacturing a device
* with USB
* @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
Expand Down Expand Up @@ -99,6 +115,7 @@ extern "C" {
#ifndef USB_CONFIG_DEFAULT_LANGID
#define USB_CONFIG_DEFAULT_LANGID 0x0409 /* EN-US */
#endif
/** @} */

/**
* @brief USB version definitions
Expand Down
16 changes: 11 additions & 5 deletions sys/include/usb/usbus.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
extern "C" {
#endif

/**
* @defgroup usb_usbus_conf USBUS compile time configurations
* @ingroup usb_conf
* @{
*/
/**
* @brief USBUS thread stack size
*/
Expand All @@ -54,11 +59,6 @@ extern "C" {
#define USBUS_PRIO (THREAD_PRIORITY_MAIN - 6)
#endif

/**
* @brief USBUS thread name
*/
#define USBUS_TNAME "usbus"

/**
* @brief USBUS auto attach setting
*
Expand All @@ -80,6 +80,12 @@ extern "C" {
#ifndef USBUS_EP0_SIZE
#define USBUS_EP0_SIZE 64
#endif
/** @} */

/**
* @brief USBUS thread name
*/
#define USBUS_TNAME "usbus"

/**
* @name USBUS thread flags
Expand Down
6 changes: 6 additions & 0 deletions sys/include/usb/usbus/cdc/acm.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
extern "C" {
#endif

/**
* @defgroup usbus_cdc_acm_conf USBUS CDC ACM compile time configurations
* @ingroup usb_conf
* @{
*/
/**
* @brief Buffer size for STDIN and STDOUT data to and from USB when using
* the USBUS_CDC_ACM_STDIO module
Expand All @@ -51,6 +56,7 @@ extern "C" {
#ifndef USBUS_CDC_ACM_BULK_EP_SIZE
#define USBUS_CDC_ACM_BULK_EP_SIZE (64)
#endif
/** @} */

/**
* @brief USBUS CDC ACM interrupt endpoint size.
Expand Down

0 comments on commit 1d223b5

Please sign in to comment.