Explorar o código

rename hal.h to tusb_hal.h

hathach %!s(int64=8) %!d(string=hai) anos
pai
achega
7ee801a209

+ 2 - 4
hw/mcu/nxp/lpc43xx/hal_mcu/hal_lpc43xx.c

@@ -36,13 +36,11 @@
 */
 /**************************************************************************/
 
-#include "common/common.h"
-#include "hal/hal.h"
+#include "hal_mcu.h"
+#include "tusb.h"
 
 #if TUSB_CFG_MCU == MCU_LPC43XX
 
-#include "LPC43xx.h"
-#include "lpc43xx_cgu.h"
 #include "lpc43xx_scu.h"
 
 enum {

+ 1 - 1
tinyusb/common/assertion.h

@@ -54,7 +54,7 @@ extern "C"
 #include <stdint.h>
 #include "compiler/compiler.h"
 
-#include "hal/hal.h" // TODO find a way to break hal dependency
+#include "tusb_hal.h" // TODO find a way to break hal dependency
 
 #define VOID_RETURN
 

+ 1 - 1
tinyusb/device/dcd_lpc43xx.c

@@ -45,7 +45,7 @@
 // INCLUDE
 //--------------------------------------------------------------------+
 #include "common/common.h"
-#include "hal/hal.h"
+#include "tusb_hal.h"
 #include "osal/osal.h"
 #include "common/timeout_timer.h"
 

+ 1 - 1
tinyusb/tusb.h

@@ -47,7 +47,7 @@
 // INCLUDE
 //--------------------------------------------------------------------+
 #include "common/common.h"
-#include "hal/hal.h"
+#include "tusb_hal.h"
 #include "osal/osal.h"
 
 //------------- HOST -------------//

+ 7 - 6
tinyusb/hal/hal.h → tinyusb/tusb_hal.h

@@ -39,6 +39,10 @@
 #ifndef _TUSB_HAL_H_
 #define _TUSB_HAL_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 //--------------------------------------------------------------------+
 // INCLUDES
 //--------------------------------------------------------------------+
@@ -49,8 +53,8 @@
 #include "common/tusb_errors.h"
 #include "common/compiler/compiler.h"
 
-// callback from tusb.h
-void tusb_isr(uint8_t coreid);
+// from mcu port
+#include "hal_mcu.h"
 
 //--------------------------------------------------------------------+
 // HAL API
@@ -83,11 +87,8 @@ void hal_usb_int_enable(uint8_t coreid);
  */
 void hal_usb_int_disable(uint8_t coreid);
 
-#include "hal_mcu.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+
 
 static inline bool hal_debugger_is_attached(void)
 {