summaryrefslogtreecommitdiff
path: root/tinyusb/hal/hal.h
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-03-23 10:56:41 +0700
committerhathach <[email protected]>2013-03-23 10:56:41 +0700
commit0c6d406ddf68ae144982132d21349880896c2f74 (patch)
tree621e952e123f9ae6714e167d03db2d8d5bd4801f /tinyusb/hal/hal.h
parentae9b9ead7a614251486897c8ba11b7c1e848ac8c (diff)
- house keeping
- add controller id for hal_interrupt_enable/disable
Diffstat (limited to 'tinyusb/hal/hal.h')
-rw-r--r--tinyusb/hal/hal.h32
1 files changed, 10 insertions, 22 deletions
diff --git a/tinyusb/hal/hal.h b/tinyusb/hal/hal.h
index 941063665..f95d62ae9 100644
--- a/tinyusb/hal/hal.h
+++ b/tinyusb/hal/hal.h
@@ -72,28 +72,16 @@ extern "C" {
// callback from tusb.h
extern void tusb_isr(uint8_t controller_id);
+/// USB hardware init
+tusb_error_t hal_init(void);
-/** \brief USB hardware init
- *
- * \param[in] para1
- * \param[out] para2
- * \return Error Code of the \ref TUSB_ERROR enum
- * \note
- */
-tusb_error_t hal_init();
-
-/**
- * Enable USB Interrupt
- */
-static inline void hal_interrupt_enable() ATTR_ALWAYS_INLINE;
-
-/**
- * Disable USB Interrupt
- */
-static inline void hal_interrupt_disable() ATTR_ALWAYS_INLINE;
+/// Enable USB Interrupt
+static inline void hal_interrupt_enable(uint8_t controller_id) ATTR_ALWAYS_INLINE;
+/// Disable USB Interrupt
+static inline void hal_interrupt_disable(uint8_t controller_id) ATTR_ALWAYS_INLINE;
-static inline bool hal_debugger_is_attached() ATTR_PURE ATTR_ALWAYS_INLINE;
-static inline bool hal_debugger_is_attached()
+static inline bool hal_debugger_is_attached(void) ATTR_PURE ATTR_ALWAYS_INLINE;
+static inline bool hal_debugger_is_attached(void)
{
#ifndef _TEST_
return (CoreDebug->DHCSR & CoreDebug_DHCSR_C_DEBUGEN_Msk) == CoreDebug_DHCSR_C_DEBUGEN_Msk;
@@ -102,8 +90,8 @@ static inline bool hal_debugger_is_attached()
#endif
}
-static inline void hal_debugger_breakpoint() ATTR_ALWAYS_INLINE;
-static inline void hal_debugger_breakpoint()
+static inline void hal_debugger_breakpoint(void) ATTR_ALWAYS_INLINE;
+static inline void hal_debugger_breakpoint(void)
{
#ifndef _TEST_
if (hal_debugger_is_attached()) /* if there is debugger connected */