Merge branch 'master' of https://github.com/hathach/tinyusb into stm32f4
This commit is contained in:
@@ -39,9 +39,6 @@
|
||||
#ifndef _TUSB_CONFIG_H_
|
||||
#define _TUSB_CONFIG_H_
|
||||
|
||||
#include "tusb_option.h"
|
||||
#include "bsp/board.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -52,10 +49,15 @@
|
||||
|
||||
// defined by compiler flags for flexibility
|
||||
#ifndef CFG_TUSB_MCU
|
||||
#error CFG_TUSB_MCU should be defined using compiler flags
|
||||
#error CFG_TUSB_MCU must be defined
|
||||
#endif
|
||||
|
||||
#if CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_LPC18XX
|
||||
#define CFG_TUSB_RHPORT0_MODE (OPT_MODE_DEVICE | OPT_MODE_HIGH_SPEED)
|
||||
#else
|
||||
#define CFG_TUSB_RHPORT0_MODE OPT_MODE_DEVICE
|
||||
#endif
|
||||
|
||||
#define CFG_TUSB_DEBUG 2
|
||||
#define CFG_TUSB_OS OPT_OS_NONE
|
||||
|
||||
@@ -88,12 +90,22 @@
|
||||
*/
|
||||
#define CFG_TUD_DESC_AUTO 1
|
||||
|
||||
/* USB VID/PID if not defined, tinyusb to use default value
|
||||
/* If USB VID/PID is not defined, tinyusb will use default value
|
||||
* Note: different class combination e.g CDC and (CDC + MSC) should have different
|
||||
* PID since Host OS will "remembered" device driver after the first plug */
|
||||
// #define CFG_TUD_DESC_VID 0xCAFE
|
||||
// #define CFG_TUD_DESC_PID 0x0001
|
||||
|
||||
// LPC 17xx and 40xx endpoint type (bulk/interrupt/iso) are fixed by its number
|
||||
// Therefor we need to force endpoint number to correct type on lpc17xx
|
||||
#if CFG_TUSB_MCU == OPT_MCU_LPC175X_6X || CFG_TUSB_MCU == OPT_MCU_LPC177X_8X || CFG_TUSB_MCU == OPT_MCU_LPC40XX
|
||||
#define CFG_TUD_DESC_CDC_EPNUM_NOTIF 1
|
||||
#define CFG_TUD_DESC_CDC_EPNUM 2
|
||||
#define CFG_TUD_DESC_MSC_EPNUM 5
|
||||
#define CFG_TUD_DESC_HID_KEYBOARD_EPNUM 4
|
||||
#define CFG_TUD_DESC_HID_MOUSE_EPNUM 7
|
||||
#endif
|
||||
|
||||
//------------- CLASS -------------//
|
||||
#define CFG_TUD_CDC 1
|
||||
#define CFG_TUD_MSC 0
|
||||
@@ -109,7 +121,6 @@
|
||||
#define CFG_TUD_HID_KEYBOARD_BOOT 1
|
||||
#define CFG_TUD_HID_MOUSE_BOOT 1
|
||||
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// CDC
|
||||
//--------------------------------------------------------------------
|
||||
@@ -121,7 +132,6 @@
|
||||
//--------------------------------------------------------------------
|
||||
// MSC
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
// Number of supported Logical Unit Number (At least 1)
|
||||
#define CFG_TUD_MSC_MAXLUN 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user