Просмотр исходного кода

rename hal_init() to hal_usb_init()

hathach 8 лет назад
Родитель
Сommit
381caaff1c

+ 1 - 1
hw/mcu/nxp/lpc11uxx/hal_mcu/hal_lpc11uxx.c

@@ -53,7 +53,7 @@ void hal_usb_int_disable(uint8_t coreid)
   NVIC_DisableIRQ(USB_IRQn);
 }
 
-bool hal_init(void)
+bool hal_usb_init(void)
 {
 	// TODO remove magic number
   /* Enable AHB clock to the USB block and USB RAM. */

+ 1 - 1
hw/mcu/nxp/lpc13uxx/hal_mcu/hal_lpc13uxx.c

@@ -53,7 +53,7 @@ void hal_usb_int_disable(uint8_t coreid)
   NVIC_DisableIRQ(USB_IRQ_IRQn);
 }
 
-bool hal_init(void)
+bool hal_usb_init(void)
 {
 	// TODO remove magic number
   LPC_SYSCON->SYSAHBCLKCTRL |= ((0x1<<14) | (0x1<<27)); /* Enable AHB clock to the USB block and USB RAM. */

+ 1 - 1
hw/mcu/nxp/lpc175x_6x/hal_mcu/hal_lpc175x_6x.c

@@ -56,7 +56,7 @@ void hal_usb_int_disable(uint8_t coreid)
 //--------------------------------------------------------------------+
 // IMPLEMENTATION
 //--------------------------------------------------------------------+
-bool hal_init(void)
+bool hal_usb_init(void)
 {
   enum {
     USBCLK_DEVCIE = 0x12,     // AHB + Device

+ 0 - 0
tinyusb/device/dcd_lpc43xx.c → hw/mcu/nxp/lpc43xx/hal_mcu/dcd_lpc43xx.c


+ 0 - 0
tinyusb/device/dcd_lpc43xx.h → hw/mcu/nxp/lpc43xx/hal_mcu/dcd_lpc43xx.h


+ 1 - 1
hw/mcu/nxp/lpc43xx/hal_mcu/hal_lpc43xx.c

@@ -79,7 +79,7 @@ static void hal_controller_reset(uint8_t coreid)
 //  return timeout_expired(&timeout) ? TUSB_ERROR_OSAL_TIMEOUT : TUSB_ERROR_NONE;
 }
 
-bool hal_init(void)
+bool hal_usb_init(void)
 {
   LPC_CREG->CREG0 &= ~(1<<5); /* Turn on the phy */
 

+ 2 - 0
tinyusb/device/usbd_dcd.h

@@ -73,6 +73,8 @@ typedef struct {
 }usbd_device_info_t;
 
 extern usbd_device_info_t usbd_devices[CONTROLLER_DEVICE_NUMBER];
+
+
 //--------------------------------------------------------------------+
 // callback from DCD ISR
 //--------------------------------------------------------------------+

+ 1 - 1
tinyusb/tusb.c

@@ -42,7 +42,7 @@
 
 tusb_error_t tusb_init(void)
 {
-  VERIFY( hal_init(), TUSB_ERROR_FAILED ) ; // hardware init
+  VERIFY( hal_usb_init(), TUSB_ERROR_FAILED ) ; // hardware init
 
 #if MODE_HOST_SUPPORTED
   ASSERT_STATUS( usbh_init() ); // host stack init

+ 1 - 1
tinyusb/tusb_hal.h

@@ -71,7 +71,7 @@ extern "C" {
  * \returns   true if succeedded
  * \note      This function is invoked by \ref tusb_init as part of the initialization.
  */
-bool hal_init(void);
+bool hal_usb_init(void);
 
 /** \brief 			Enable USB Interrupt on a specific USB Controller
  * \param[in]		coreid	is a zero-based index to identify USB controller's ID