diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/device/usbd.h | 6 | ||||
| -rw-r--r-- | src/osal/osal.h | 2 | ||||
| -rw-r--r-- | src/tusb_option.h | 7 |
3 files changed, 9 insertions, 6 deletions
diff --git a/src/device/usbd.h b/src/device/usbd.h index 07163a013..beeec7e1c 100644 --- a/src/device/usbd.h +++ b/src/device/usbd.h @@ -156,9 +156,9 @@ TU_ATTR_WEAK bool tud_vendor_control_complete_cb(uint8_t rhport, tusb_control_re //------------- Configuration -------------// #define TUD_CONFIG_DESC_LEN (9) -// Interface count, string index, total length, attribute, power in mA -#define TUD_CONFIG_DESCRIPTOR(_itfcount, _stridx, _total_len, _attribute, _power_ma) \ - 9, TUSB_DESC_CONFIGURATION, U16_TO_U8S_LE(_total_len), _itfcount, 1, _stridx, TU_BIT(7) | _attribute, (_power_ma)/2 +// Config number, interface count, string index, total length, attribute, power in mA +#define TUD_CONFIG_DESCRIPTOR(config_num, _itfcount, _stridx, _total_len, _attribute, _power_ma) \ + 9, TUSB_DESC_CONFIGURATION, U16_TO_U8S_LE(_total_len), _itfcount, config_num, _stridx, TU_BIT(7) | _attribute, (_power_ma)/2 //------------- CDC -------------// diff --git a/src/osal/osal.h b/src/osal/osal.h index 8b7527a7e..94c71e7d9 100644 --- a/src/osal/osal.h +++ b/src/osal/osal.h @@ -53,6 +53,8 @@ typedef void (*osal_task_func_t)( void * ); #include "osal_freertos.h" #elif CFG_TUSB_OS == OPT_OS_MYNEWT #include "osal_mynewt.h" +#elif CFG_TUSB_OS == OPT_OS_CUSTOM + #include "tusb_os_custom.h" // implemented by application #else #error OS is not supported yet #endif diff --git a/src/tusb_option.h b/src/tusb_option.h index 4a9d05712..6e2a2f125 100644 --- a/src/tusb_option.h +++ b/src/tusb_option.h @@ -93,9 +93,10 @@ /** \defgroup group_supported_os Supported RTOS * \ref CFG_TUSB_OS must be defined to one of these * @{ */ -#define OPT_OS_NONE 1 ///< No RTOS -#define OPT_OS_FREERTOS 2 ///< FreeRTOS -#define OPT_OS_MYNEWT 3 ///< Mynewt OS +#define OPT_OS_NONE 1 ///< No RTOS +#define OPT_OS_FREERTOS 2 ///< FreeRTOS +#define OPT_OS_MYNEWT 3 ///< Mynewt OS +#define OPT_OS_CUSTOM 4 ///< Custom OS is implemented by application /** @} */ |
