diff --git a/hw/mcu/nxp/lpc43xx/hal_mcu/hal_lpc43xx.c b/hw/mcu/nxp/lpc43xx/hal_mcu/hal_lpc43xx.c index 0199934f..a1791899 100644 --- a/hw/mcu/nxp/lpc43xx/hal_mcu/hal_lpc43xx.c +++ b/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 { diff --git a/tinyusb/common/assertion.h b/tinyusb/common/assertion.h index 5d78dcce..16c9b07e 100644 --- a/tinyusb/common/assertion.h +++ b/tinyusb/common/assertion.h @@ -54,7 +54,7 @@ extern "C" #include #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 diff --git a/tinyusb/device/dcd_lpc43xx.c b/tinyusb/device/dcd_lpc43xx.c index a513084c..3b69b482 100644 --- a/tinyusb/device/dcd_lpc43xx.c +++ b/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" diff --git a/tinyusb/tusb.h b/tinyusb/tusb.h index 5eabf066..84ab07a3 100644 --- a/tinyusb/tusb.h +++ b/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 -------------// diff --git a/tinyusb/hal/hal.h b/tinyusb/tusb_hal.h similarity index 96% rename from tinyusb/hal/hal.h rename to tinyusb/tusb_hal.h index ff4c7fca..a99c58cc 100644 --- a/tinyusb/hal/hal.h +++ b/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) {