summaryrefslogtreecommitdiff
path: root/tinyusb
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-11-25 12:48:27 +0700
committerhathach <[email protected]>2013-11-25 12:48:27 +0700
commita5ba28355782eedb967c4ec41a5b83323118251d (patch)
tree4f4fa0bfa3ba3fb8d781690fb3649ae834541ee0 /tinyusb
parent41ffcaf4a508a421a49d8650777d8b0325b28921 (diff)
change MCU to TUSB_CFG_MCU
Diffstat (limited to 'tinyusb')
-rw-r--r--tinyusb/.cproject6
-rw-r--r--tinyusb/device/dcd_lpc175x_6x.c2
-rw-r--r--tinyusb/device/dcd_lpc43xx.c2
-rw-r--r--tinyusb/device/dcd_lpc_11uxx_13uxx.c2
-rw-r--r--tinyusb/device/usbd.c2
-rw-r--r--tinyusb/device/usbd.h2
-rw-r--r--tinyusb/hal/hal.h10
-rw-r--r--tinyusb/hal/hal_lpc11uxx.c2
-rw-r--r--tinyusb/hal/hal_lpc13uxx.c2
-rw-r--r--tinyusb/hal/hal_lpc175x_6x.c2
-rw-r--r--tinyusb/hal/hal_lpc43xx.c2
-rw-r--r--tinyusb/host/ehci/ehci.c2
-rw-r--r--tinyusb/mcu_capacity.h4
13 files changed, 20 insertions, 20 deletions
diff --git a/tinyusb/.cproject b/tinyusb/.cproject
index fdb4d73d8..38563efe7 100644
--- a/tinyusb/.cproject
+++ b/tinyusb/.cproject
@@ -36,7 +36,7 @@
<option id="com.crt.advproject.gcc.thumb.724152017" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" value="true" valueType="boolean"/>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.38062140" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="__REDLIB__"/>
- <listOptionValue builtIn="false" value="MCU=MCU_LPC13UXX"/>
+ <listOptionValue builtIn="false" value="TUSB_CFG_MCU=MCU_LPC13UXX"/>
<listOptionValue builtIn="false" value="DEBUG"/>
<listOptionValue builtIn="false" value="__CODE_RED"/>
</option>
@@ -666,7 +666,7 @@
<option id="com.crt.advproject.gcc.thumb.1699307665" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" value="true" valueType="boolean"/>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.1161208646" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="__REDLIB__"/>
- <listOptionValue builtIn="false" value="MCU=MCU_LPC11UXX"/>
+ <listOptionValue builtIn="false" value="TUSB_CFG_MCU=MCU_LPC11UXX"/>
<listOptionValue builtIn="false" value="DEBUG"/>
<listOptionValue builtIn="false" value="__CODE_RED"/>
</option>
@@ -1298,7 +1298,7 @@
<option id="gnu.c.compiler.option.preprocessor.def.symbols.1903848113" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="__REDLIB__"/>
<listOptionValue builtIn="false" value="CORE_M4"/>
- <listOptionValue builtIn="false" value="MCU=MCU_LPC43XX"/>
+ <listOptionValue builtIn="false" value="TUSB_CFG_MCU=MCU_LPC43XX"/>
<listOptionValue builtIn="false" value="DEBUG"/>
<listOptionValue builtIn="false" value="__CODE_RED"/>
</option>
diff --git a/tinyusb/device/dcd_lpc175x_6x.c b/tinyusb/device/dcd_lpc175x_6x.c
index bb6410e02..4e95f03da 100644
--- a/tinyusb/device/dcd_lpc175x_6x.c
+++ b/tinyusb/device/dcd_lpc175x_6x.c
@@ -38,7 +38,7 @@
#include "tusb_option.h"
-#if MODE_DEVICE_SUPPORTED && (MCU == MCU_LPC175X_6X)
+#if MODE_DEVICE_SUPPORTED && (TUSB_CFG_MCU == MCU_LPC175X_6X)
#define _TINY_USB_SOURCE_FILE_
//--------------------------------------------------------------------+
diff --git a/tinyusb/device/dcd_lpc43xx.c b/tinyusb/device/dcd_lpc43xx.c
index 152b384d5..296a19a6c 100644
--- a/tinyusb/device/dcd_lpc43xx.c
+++ b/tinyusb/device/dcd_lpc43xx.c
@@ -38,7 +38,7 @@
#include "tusb_option.h"
-#if MODE_DEVICE_SUPPORTED && MCU == MCU_LPC43XX
+#if MODE_DEVICE_SUPPORTED && TUSB_CFG_MCU == MCU_LPC43XX
#define _TINY_USB_SOURCE_FILE_
//--------------------------------------------------------------------+
diff --git a/tinyusb/device/dcd_lpc_11uxx_13uxx.c b/tinyusb/device/dcd_lpc_11uxx_13uxx.c
index 209462ef9..22dcaafa0 100644
--- a/tinyusb/device/dcd_lpc_11uxx_13uxx.c
+++ b/tinyusb/device/dcd_lpc_11uxx_13uxx.c
@@ -38,7 +38,7 @@
#include "tusb_option.h"
-#if MODE_DEVICE_SUPPORTED && (MCU == MCU_LPC11UXX || MCU == MCU_LPC13UXX)
+#if MODE_DEVICE_SUPPORTED && (TUSB_CFG_MCU == MCU_LPC11UXX || TUSB_CFG_MCU == MCU_LPC13UXX)
#define _TINY_USB_SOURCE_FILE_
//--------------------------------------------------------------------+
diff --git a/tinyusb/device/usbd.c b/tinyusb/device/usbd.c
index fd62874b3..77346fc05 100644
--- a/tinyusb/device/usbd.c
+++ b/tinyusb/device/usbd.c
@@ -50,7 +50,7 @@
#include "usbd_dcd.h"
// Some MCUs cannot transfer more than 64 bytes each queue, thus require special task-alike treatment
-#if MCU == MCU_LPC11UXX || MCU == MCU_LPC175X_6X
+#if TUSB_CFG_MCU == MCU_LPC11UXX || TUSB_CFG_MCU == MCU_LPC175X_6X
#define USBD_CONTROL_ONE_PACKET_EACH_XFER // for each Transfer, cannot queue more than packet size
enum {
USBD_COTNROL_MAX_LENGTH_EACH_XFER = 64
diff --git a/tinyusb/device/usbd.h b/tinyusb/device/usbd.h
index 6128f506d..d1e71c0dd 100644
--- a/tinyusb/device/usbd.h
+++ b/tinyusb/device/usbd.h
@@ -58,7 +58,7 @@
#endif
// LPC11uxx and LPC13uxx requires each buffer has to be 64-byte alignment
-#if MCU == MCU_LPC11UXX || MCU == MCU_LPC13UXX
+#if TUSB_CFG_MCU == MCU_LPC11UXX || TUSB_CFG_MCU == MCU_LPC13UXX
#define ATTR_USB_MIN_ALIGNMENT ATTR_ALIGNED(64)
#else
#define ATTR_USB_MIN_ALIGNMENT
diff --git a/tinyusb/hal/hal.h b/tinyusb/hal/hal.h
index c6f44f47c..b26804efc 100644
--- a/tinyusb/hal/hal.h
+++ b/tinyusb/hal/hal.h
@@ -86,13 +86,13 @@ static inline void hal_interrupt_disable(uint8_t coreid) ATTR_ALWAYS_INLINE;
//--------------------------------------------------------------------+
// INCLUDE DRIVEN
//--------------------------------------------------------------------+
-#if MCU == MCU_LPC11UXX
+#if TUSB_CFG_MCU == MCU_LPC11UXX
#include "hal_lpc11uxx.h"
-#elif MCU == MCU_LPC13UXX
+#elif TUSB_CFG_MCU == MCU_LPC13UXX
#include "hal_lpc13uxx.h"
-#elif MCU == MCU_LPC43XX
+#elif TUSB_CFG_MCU == MCU_LPC43XX
#include "hal_lpc43xx.h"
-#elif MCU == MCU_LPC175X_6X
+#elif TUSB_CFG_MCU == MCU_LPC175X_6X
#include "hal_lpc175x_6x.h"
#else
#error MCU is not defined or supported yet
@@ -107,7 +107,7 @@ static inline bool hal_debugger_is_attached(void) ATTR_PURE ATTR_ALWAYS_INLINE;
static inline bool hal_debugger_is_attached(void)
{
// TODO check core M3/M4 defined instead
-#if !defined(_TEST_) && !(MCU==MCU_LPC11UXX)
+#if !defined(_TEST_) && !(TUSB_CFG_MCU==MCU_LPC11UXX)
return ( (CoreDebug->DHCSR & CoreDebug_DHCSR_C_DEBUGEN_Msk) == CoreDebug_DHCSR_C_DEBUGEN_Msk );
#else
return true; // force to break into breakpoint
diff --git a/tinyusb/hal/hal_lpc11uxx.c b/tinyusb/hal/hal_lpc11uxx.c
index c1e504731..60177485d 100644
--- a/tinyusb/hal/hal_lpc11uxx.c
+++ b/tinyusb/hal/hal_lpc11uxx.c
@@ -39,7 +39,7 @@
#include "common/common.h"
#include "hal.h"
-#if MCU == MCU_LPC11UXX
+#if TUSB_CFG_MCU == MCU_LPC11UXX
tusb_error_t hal_init(void)
{
diff --git a/tinyusb/hal/hal_lpc13uxx.c b/tinyusb/hal/hal_lpc13uxx.c
index 4e986faac..706f5004c 100644
--- a/tinyusb/hal/hal_lpc13uxx.c
+++ b/tinyusb/hal/hal_lpc13uxx.c
@@ -39,7 +39,7 @@
#include "common/common.h"
#include "hal.h"
-#if MCU == MCU_LPC13UXX
+#if TUSB_CFG_MCU == MCU_LPC13UXX
tusb_error_t hal_init(void)
{
diff --git a/tinyusb/hal/hal_lpc175x_6x.c b/tinyusb/hal/hal_lpc175x_6x.c
index ae63b7b7a..60b66a5e4 100644
--- a/tinyusb/hal/hal_lpc175x_6x.c
+++ b/tinyusb/hal/hal_lpc175x_6x.c
@@ -38,7 +38,7 @@
#include "tusb_option.h"
-#if MCU == MCU_LPC175X_6X
+#if TUSB_CFG_MCU == MCU_LPC175X_6X
//--------------------------------------------------------------------+
// INCLUDE
diff --git a/tinyusb/hal/hal_lpc43xx.c b/tinyusb/hal/hal_lpc43xx.c
index 9cb07deff..fd64fc59a 100644
--- a/tinyusb/hal/hal_lpc43xx.c
+++ b/tinyusb/hal/hal_lpc43xx.c
@@ -39,7 +39,7 @@
#include "common/common.h"
#include "hal.h"
-#if MCU == MCU_LPC43XX
+#if TUSB_CFG_MCU == MCU_LPC43XX
#include "lpc43xx_cgu.h"
#include "lpc43xx_scu.h"
diff --git a/tinyusb/host/ehci/ehci.c b/tinyusb/host/ehci/ehci.c
index 322f17879..21114712e 100644
--- a/tinyusb/host/ehci/ehci.c
+++ b/tinyusb/host/ehci/ehci.c
@@ -38,7 +38,7 @@
#include "common/common.h"
-#if MODE_HOST_SUPPORTED && (MCU == MCU_LPC43XX || MCU == MCU_LPC18XX)
+#if MODE_HOST_SUPPORTED && (TUSB_CFG_MCU == MCU_LPC43XX || TUSB_CFG_MCU == MCU_LPC18XX)
//--------------------------------------------------------------------+
// INCLUDE
//--------------------------------------------------------------------+
diff --git a/tinyusb/mcu_capacity.h b/tinyusb/mcu_capacity.h
index b5944ebed..3b9181700 100644
--- a/tinyusb/mcu_capacity.h
+++ b/tinyusb/mcu_capacity.h
@@ -67,14 +67,14 @@
//--------------------------------------------------------------------+
// Controller
//--------------------------------------------------------------------+
-#if MCU == MCU_LPC43XX || MCU == MCU_LPC18XX
+#if TUSB_CFG_MCU == MCU_LPC43XX || TUSB_CFG_MCU == MCU_LPC18XX
#define CAP_CONTROLLER_NUMBER 2
#else
#define CAP_CONTROLLER_NUMBER 1
#endif
#define CAP_MODE_DEVICE
-#if MCU == MCU_LPC43XX || MCU == MCU_LPC18XX || MCU == MCU_LPC175X_6X
+#if TUSB_CFG_MCU == MCU_LPC43XX || TUSB_CFG_MCU == MCU_LPC18XX || TUSB_CFG_MCU == MCU_LPC175X_6X
#define CAP_MODE_HOST
#endif