mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-18 20:42:24 +00:00
rename hal_init() to hal_usb_init()
This commit is contained in:
parent
bc9274591f
commit
381caaff1c
@ -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. */
|
||||
|
@ -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. */
|
||||
|
@ -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
|
||||
|
@ -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 */
|
||||
|
||||
|
@ -73,6 +73,8 @@ typedef struct {
|
||||
}usbd_device_info_t;
|
||||
|
||||
extern usbd_device_info_t usbd_devices[CONTROLLER_DEVICE_NUMBER];
|
||||
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// callback from DCD ISR
|
||||
//--------------------------------------------------------------------+
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user