diff options
| author | hathach <[email protected]> | 2018-03-02 22:46:36 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-03-02 22:46:36 +0700 |
| commit | 33d348c288514bb2c949944e06cf45fc6751929f (patch) | |
| tree | 7083576e448daf116fb942a3ff8fff3948d47243 /hw | |
| parent | b0a6395a4526b07fe66b356e7990a11fe6b815a9 (diff) | |
rename dcd_init to hal_dcd_init()
Diffstat (limited to 'hw')
| -rw-r--r-- | hw/mcu/nxp/lpc43xx/tusb_port/dcd_lpc43xx.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/hw/mcu/nxp/lpc43xx/tusb_port/dcd_lpc43xx.c b/hw/mcu/nxp/lpc43xx/tusb_port/dcd_lpc43xx.c index f72949868..93ec04d91 100644 --- a/hw/mcu/nxp/lpc43xx/tusb_port/dcd_lpc43xx.c +++ b/hw/mcu/nxp/lpc43xx/tusb_port/dcd_lpc43xx.c @@ -49,8 +49,8 @@ #include "osal/osal.h"
#include "common/timeout_timer.h"
-#include "dcd.h"
-#include "usbd_dcd.h"
+#include "device/dcd.h"
+#include "device/usbd_dcd.h"
#include "dcd_lpc43xx.h"
//--------------------------------------------------------------------+
@@ -245,7 +245,7 @@ static void bus_reset(uint8_t coreid) }
-static void lpc43xx_controller_init(uint8_t coreid)
+bool hal_dcd_init(uint8_t coreid)
{
LPC_USB0_Type* const lpc_usb = LPC_USB[coreid];
dcd_data_t* p_dcd = dcd_data_ptr[coreid];
@@ -258,19 +258,8 @@ static void lpc43xx_controller_init(uint8_t coreid) lpc_usb->USBCMD_D &= ~0x00FF0000; // Interrupt Threshold Interval = 0
lpc_usb->USBCMD_D |= BIT_(0); // connect
-}
-
-tusb_error_t dcd_init(void)
-{
- #if (TUSB_CFG_CONTROLLER_0_MODE & TUSB_MODE_DEVICE)
- lpc43xx_controller_init(0);
- #endif
- #if (TUSB_CFG_CONTROLLER_1_MODE & TUSB_MODE_DEVICE)
- lpc43xx_controller_init(1);
- #endif
-
- return TUSB_ERROR_NONE;
+ return true;
}
//--------------------------------------------------------------------+
|
