diff options
| author | hathach <[email protected]> | 2018-03-02 15:39:49 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-03-02 15:39:49 +0700 |
| commit | 633f46432ff369be3b52d292736a01c23124f3d1 (patch) | |
| tree | 842d1e39ac383944f897d088475f06f86326d2df /tinyusb/hal | |
| parent | dc12e55c568a182ac95e4e7594e0059c1b8f7f4b (diff) | |
clean up API
Diffstat (limited to 'tinyusb/hal')
| -rw-r--r-- | tinyusb/hal/hal.h | 4 | ||||
| -rw-r--r-- | tinyusb/hal/hal_lpc11uxx.c | 4 | ||||
| -rw-r--r-- | tinyusb/hal/hal_lpc13uxx.c | 4 | ||||
| -rw-r--r-- | tinyusb/hal/hal_lpc175x_6x.c | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/tinyusb/hal/hal.h b/tinyusb/hal/hal.h index f395c6d23..696c5d423 100644 --- a/tinyusb/hal/hal.h +++ b/tinyusb/hal/hal.h @@ -64,10 +64,10 @@ void tusb_isr(uint8_t coreid); * @{ */
/** \brief Initialize USB controller hardware
- * \returns \ref tusb_error_t type to indicate success or error condition.
+ * \returns true if succeedded
* \note This function is invoked by \ref tusb_init as part of the initialization.
*/
-tusb_error_t hal_init(void);
+bool hal_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
diff --git a/tinyusb/hal/hal_lpc11uxx.c b/tinyusb/hal/hal_lpc11uxx.c index f240597cc..066679a27 100644 --- a/tinyusb/hal/hal_lpc11uxx.c +++ b/tinyusb/hal/hal_lpc11uxx.c @@ -53,7 +53,7 @@ void hal_usb_int_disable(uint8_t coreid) NVIC_DisableIRQ(USB_IRQn);
}
-tusb_error_t hal_init(void)
+bool hal_init(void)
{
// TODO remove magic number
/* Enable AHB clock to the USB block and USB RAM. */
@@ -70,7 +70,7 @@ tusb_error_t hal_init(void) LPC_IOCON->PIO0_6 &= ~0x07;
LPC_IOCON->PIO0_6 |= (0x01<<0); /* Secondary function SoftConn */
- return TUSB_ERROR_NONE;
+ return true;
}
void USB_IRQHandler(void)
diff --git a/tinyusb/hal/hal_lpc13uxx.c b/tinyusb/hal/hal_lpc13uxx.c index a8969a2f7..9de859e6f 100644 --- a/tinyusb/hal/hal_lpc13uxx.c +++ b/tinyusb/hal/hal_lpc13uxx.c @@ -53,7 +53,7 @@ void hal_usb_int_disable(uint8_t coreid) NVIC_DisableIRQ(USB_IRQ_IRQn);
}
-tusb_error_t hal_init(void)
+bool hal_init(void)
{
// TODO remove magic number
LPC_SYSCON->SYSAHBCLKCTRL |= ((0x1<<14) | (0x1<<27)); /* Enable AHB clock to the USB block and USB RAM. */
@@ -69,7 +69,7 @@ tusb_error_t hal_init(void) LPC_IOCON->PIO0_6 &= ~0x07;
LPC_IOCON->PIO0_6 |= (0x01<<0); /* Secondary function SoftConn */
- return TUSB_ERROR_NONE;
+ return true;
}
void USB_IRQHandler(void)
diff --git a/tinyusb/hal/hal_lpc175x_6x.c b/tinyusb/hal/hal_lpc175x_6x.c index 32be8f3fe..3463a70db 100644 --- a/tinyusb/hal/hal_lpc175x_6x.c +++ b/tinyusb/hal/hal_lpc175x_6x.c @@ -56,7 +56,7 @@ void hal_usb_int_disable(uint8_t coreid) //--------------------------------------------------------------------+
// IMPLEMENTATION
//--------------------------------------------------------------------+
-tusb_error_t hal_init(void)
+bool hal_init(void)
{
enum {
USBCLK_DEVCIE = 0x12, // AHB + Device
@@ -97,7 +97,7 @@ tusb_error_t hal_init(void) while ((LPC_USB->USBClkSt & USBCLK_DEVCIE) != USBCLK_DEVCIE);
#endif
- return TUSB_ERROR_NONE;
+ return true;
}
void USB_IRQHandler(void)
|
