Skip to content

Commit 8911525

Browse files
committed
internal symbol rename
1 parent 3095404 commit 8911525

File tree

5 files changed

+23
-119
lines changed

5 files changed

+23
-119
lines changed

src/common/tusb_mcu_attr.h

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,28 +27,30 @@
2727
#ifndef TUSB_MCU_ATTR_H_
2828
#define TUSB_MCU_ATTR_H_
2929

30-
#include "tusb_option.h"
31-
32-
// Attribute includes
33-
// - ENDPOINT_MAX: max (logical) number of endpoint
34-
// - ENDPOINT_EXCLUSIVE_NUMBER: endpoint number with different direction IN and OUT aren't allowed,
35-
// e.g EP1 OUT & EP1 IN cannot exist together
36-
// - RHPORT_HIGHSPEED: mask to indicate which port support highspeed mode (without external PHY)
37-
// bit0 for port0 and so on.
30+
/* Attribute includes
31+
* - ENDPOINT_MAX: max (logical) number of endpoint
32+
* - ENDPOINT_EXCLUSIVE_NUMBER: endpoint number with different direction IN and OUT aren't allowed,
33+
* e.g EP1 OUT & EP1 IN cannot exist together
34+
* - RHPORT_HIGHSPEED: mask to indicate which port support highspeed mode (without external PHY)
35+
* bit0 for port0 and so on.
36+
*/
3837

3938
//------------- NXP -------------//
4039
#if TU_CHECK_MCU(OPT_MCU_LPC11UXX, OPT_MCU_LPC13XX, OPT_MCU_LPC15XX)
4140
#define DCD_ATTR_ENDPOINT_MAX 5
4241

4342
#elif TU_CHECK_MCU(OPT_MCU_LPC175X_6X, OPT_MCU_LPC177X_8X, OPT_MCU_LPC40XX)
4443
#define DCD_ATTR_ENDPOINT_MAX 16
44+
#define HCD_ATTR_OHCI
4545

4646
#elif TU_CHECK_MCU(OPT_MCU_LPC18XX, OPT_MCU_LPC43XX)
4747
// TODO USB0 has 6, USB1 has 4
4848
#define DCD_ATTR_CONTROLLER_CHIPIDEA_HS
4949
#define DCD_ATTR_ENDPOINT_MAX 6
5050
#define DCD_ATTR_RHPORT_HIGHSPEED 0x01 // Port0 HS, Port1 FS
5151

52+
#define HCD_ATTR_EHCI
53+
5254
#elif TU_CHECK_MCU(OPT_MCU_LPC51UXX)
5355
#define DCD_ATTR_ENDPOINT_MAX 5
5456

@@ -65,6 +67,8 @@
6567
#define DCD_ATTR_ENDPOINT_MAX 8
6668
#define DCD_ATTR_RHPORT_HIGHSPEED 0x03 // Port0 HS, Port1 HS
6769

70+
#define HCD_ATTR_EHCI
71+
6872
#elif TU_CHECK_MCU(OPT_MCU_MKL25ZXX, OPT_MCU_K32L2BXX)
6973
#define DCD_ATTR_ENDPOINT_MAX 16
7074

@@ -221,7 +225,13 @@
221225
#elif TU_CHECK_MCU(OPT_MCU_F1C100S)
222226
#define DCD_ATTR_ENDPOINT_MAX 4
223227

224-
#else
228+
#endif
229+
230+
//--------------------------------------------------------------------+
231+
// Default Values
232+
//--------------------------------------------------------------------+
233+
234+
#ifndef DCD_ATTR_ENDPOINT_MAX
225235
#warning "DCD_ATTR_ENDPOINT_MAX is not defined for this MCU, default to 8"
226236
#define DCD_ATTR_ENDPOINT_MAX 8
227237
#endif

src/host/hcd.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
#include "common/tusb_common.h"
3131
#include "osal/osal.h"
3232
#include "common/tusb_fifo.h"
33-
#include "hcd_attr.h"
3433

3534
#ifdef __cplusplus
3635
extern "C" {

src/host/hcd_attr.h

Lines changed: 0 additions & 105 deletions
This file was deleted.

src/portable/ehci/ehci.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
* This file is part of the TinyUSB stack.
2525
*/
2626

27-
#include "host/hcd_attr.h"
27+
#include "tusb_option.h"
2828

29-
#if CFG_TUH_ENABLED && defined(HCD_ATTR_EHCI_TRANSDIMENSION)
29+
#if CFG_TUH_ENABLED && defined(HCD_ATTR_EHCI)
3030

3131
//--------------------------------------------------------------------+
3232
// INCLUDE
@@ -45,7 +45,7 @@
4545
#define EHCI_DBG 2
4646

4747
// Framelist size as small as possible to save SRAM
48-
#ifdef HCD_ATTR_EHCI_TRANSDIMENSION
48+
#ifdef HCD_ATTR_EHCI
4949
// NXP Transdimension: 8 elements
5050
#define FRAMELIST_SIZE_BIT_VALUE 7u
5151
#define FRAMELIST_SIZE_USBCMD_VALUE (((FRAMELIST_SIZE_BIT_VALUE & 3) << EHCI_USBCMD_POS_FRAMELIST_SIZE) | \

src/portable/ohci/ohci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* This file is part of the TinyUSB stack.
2525
*/
2626

27-
#include "host/hcd_attr.h"
27+
#include "tusb_option.h"
2828

2929
#if CFG_TUH_ENABLED && defined(HCD_ATTR_OHCI)
3030

0 commit comments

Comments
 (0)