mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
remove TUSB_CFG_DEVICE_FULLSPEED
This commit is contained in:
parent
ccc65e620a
commit
fb510559ec
@ -55,8 +55,6 @@
|
||||
//--------------------------------------------------------------------+
|
||||
#define TUSB_CFG_DEVICE_CONTROL_ENDOINT_SIZE 64
|
||||
|
||||
#define TUSB_CFG_DEVICE_FULLSPEED 1 // TODO refractor, remove
|
||||
|
||||
//------------- CLASS -------------//
|
||||
#define TUSB_CFG_DEVICE_HID_KEYBOARD 1
|
||||
#define TUSB_CFG_DEVICE_HID_MOUSE 1
|
||||
|
@ -77,57 +77,56 @@
|
||||
|
||||
#if TUSB_CFG_MCU == MCU_LPC175X_6X // MCUs's endpoint number has a fixed type
|
||||
|
||||
//------------- CDC -------------//
|
||||
#define CDC_EDPT_NOTIFICATION_ADDR EDPT_IN (1)
|
||||
#define CDC_EDPT_NOTIFICATION_PACKETSIZE 64
|
||||
//------------- CDC -------------//
|
||||
#define CDC_EDPT_NOTIFICATION_ADDR EDPT_IN (1)
|
||||
#define CDC_EDPT_NOTIFICATION_PACKETSIZE 64
|
||||
|
||||
#define CDC_EDPT_DATA_OUT_ADDR EDPT_OUT(2)
|
||||
#define CDC_EDPT_DATA_IN_ADDR EDPT_IN (2)
|
||||
#define CDC_EDPT_DATA_PACKETSIZE 64
|
||||
#define CDC_EDPT_DATA_OUT_ADDR EDPT_OUT(2)
|
||||
#define CDC_EDPT_DATA_IN_ADDR EDPT_IN (2)
|
||||
#define CDC_EDPT_DATA_PACKETSIZE 64
|
||||
|
||||
//------------- HID Keyboard -------------//
|
||||
#define HID_KEYBOARD_EDPT_ADDR EDPT_IN (4)
|
||||
#define HID_KEYBOARD_EDPT_PACKETSIZE 8
|
||||
//------------- HID Keyboard -------------//
|
||||
#define HID_KEYBOARD_EDPT_ADDR EDPT_IN (4)
|
||||
#define HID_KEYBOARD_EDPT_PACKETSIZE 8
|
||||
|
||||
//------------- HID Mouse -------------//
|
||||
#define HID_MOUSE_EDPT_ADDR EDPT_IN (7)
|
||||
#define HID_MOUSE_EDPT_PACKETSIZE 8
|
||||
//------------- HID Mouse -------------//
|
||||
#define HID_MOUSE_EDPT_ADDR EDPT_IN (7)
|
||||
#define HID_MOUSE_EDPT_PACKETSIZE 8
|
||||
|
||||
//------------- HID Generic -------------//
|
||||
|
||||
//------------- Mass Storage -------------//
|
||||
#define MSC_EDPT_OUT_ADDR EDPT_OUT(5)
|
||||
#define MSC_EDPT_IN_ADDR EDPT_IN (5)
|
||||
#define MSC_EDPT_PACKETSIZE (TUSB_CFG_DEVICE_FULLSPEED ? 64 : 512)
|
||||
//------------- HID Generic -------------//
|
||||
|
||||
//------------- Mass Storage -------------//
|
||||
#define MSC_EDPT_OUT_ADDR EDPT_OUT(5)
|
||||
#define MSC_EDPT_IN_ADDR EDPT_IN (5)
|
||||
|
||||
#else
|
||||
|
||||
//------------- CDC -------------//
|
||||
#define CDC_EDPT_NOTIFICATION_ADDR EDPT_IN (INTERFACE_NO_CDC+1)
|
||||
#define CDC_EDPT_NOTIFICATION_PACKETSIZE 64
|
||||
//------------- CDC -------------//
|
||||
#define CDC_EDPT_NOTIFICATION_ADDR EDPT_IN (INTERFACE_NO_CDC+1)
|
||||
#define CDC_EDPT_NOTIFICATION_PACKETSIZE 64
|
||||
|
||||
#define CDC_EDPT_DATA_OUT_ADDR EDPT_OUT(INTERFACE_NO_CDC+2)
|
||||
#define CDC_EDPT_DATA_IN_ADDR EDPT_IN (INTERFACE_NO_CDC+2)
|
||||
#define CDC_EDPT_DATA_PACKETSIZE 64
|
||||
#define CDC_EDPT_DATA_OUT_ADDR EDPT_OUT(INTERFACE_NO_CDC+2)
|
||||
#define CDC_EDPT_DATA_IN_ADDR EDPT_IN (INTERFACE_NO_CDC+2)
|
||||
#define CDC_EDPT_DATA_PACKETSIZE 64
|
||||
|
||||
//------------- HID Keyboard -------------//
|
||||
#define HID_KEYBOARD_EDPT_ADDR EDPT_IN (INTERFACE_NO_HID_KEYBOARD+1)
|
||||
#define HID_KEYBOARD_EDPT_PACKETSIZE 8
|
||||
//------------- HID Keyboard -------------//
|
||||
#define HID_KEYBOARD_EDPT_ADDR EDPT_IN (INTERFACE_NO_HID_KEYBOARD+1)
|
||||
#define HID_KEYBOARD_EDPT_PACKETSIZE 8
|
||||
|
||||
//------------- HID Mouse -------------//
|
||||
#define HID_MOUSE_EDPT_ADDR EDPT_IN (INTERFACE_NO_HID_MOUSE+1)
|
||||
#define HID_MOUSE_EDPT_PACKETSIZE 8
|
||||
//------------- HID Mouse -------------//
|
||||
#define HID_MOUSE_EDPT_ADDR EDPT_IN (INTERFACE_NO_HID_MOUSE+1)
|
||||
#define HID_MOUSE_EDPT_PACKETSIZE 8
|
||||
|
||||
//------------- HID Generic -------------//
|
||||
//------------- HID Generic -------------//
|
||||
|
||||
//------------- Mass Storage -------------//
|
||||
#define MSC_EDPT_OUT_ADDR EDPT_OUT(INTERFACE_NO_MSC+1)
|
||||
#define MSC_EDPT_IN_ADDR EDPT_IN (INTERFACE_NO_MSC+1)
|
||||
#define MSC_EDPT_PACKETSIZE (TUSB_CFG_DEVICE_FULLSPEED ? 64 : 512)
|
||||
//------------- Mass Storage -------------//
|
||||
#define MSC_EDPT_OUT_ADDR EDPT_OUT(INTERFACE_NO_MSC+1)
|
||||
#define MSC_EDPT_IN_ADDR EDPT_IN (INTERFACE_NO_MSC+1)
|
||||
|
||||
#endif
|
||||
|
||||
#define MSC_EDPT_PACKETSIZE (TUSB_CFG_MCU == MCU_LPC43XX ? 512 : 64)
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// CONFIGURATION DESCRIPTOR
|
||||
//--------------------------------------------------------------------+
|
||||
|
@ -31,6 +31,10 @@ LPCXpresso is an eclipse-based IDE, so you will need to create an workspace firs
|
||||
|
||||
![lpcxpresso_mcu.png](http://docs.tinyusb.org/images/lpcxpresso_mcu.png)
|
||||
|
||||
*TIPS* Working with eclipse-based IDE like lpcxpresso, you should change the indexer option in *Preferences->C/C++->Indexer* to "active build" to have a better code viewer. Those lines that are opt out by #if will be gray, I found this extremely helpful.
|
||||
|
||||
![lpcpresso_indexer](http://docs.tinyusb.org/images/lpcxpresso_indexer.png)
|
||||
|
||||
## Keil
|
||||
|
||||
It is relatively simple for Keil
|
||||
|
@ -112,7 +112,7 @@ tusb_error_t hal_init(void)
|
||||
LPC_USB1->USBMODE_D = LPC43XX_USBMODE_DEVICE;
|
||||
#endif
|
||||
|
||||
LPC_USB1->PORTSC1_D |= (1<<24); // TODO abtract, force port to fullspeed
|
||||
LPC_USB1->PORTSC1_D |= (1<<24); // TODO abstract, force port to fullspeed
|
||||
#endif
|
||||
|
||||
return TUSB_ERROR_NONE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user