summaryrefslogtreecommitdiff
path: root/src/tusb_hal.h
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-12-05 14:02:48 +0700
committerGitHub <[email protected]>2018-12-05 14:02:48 +0700
commitcf60b206528fc955bbdd1bfec2c7016a985313ea (patch)
tree50411de91abbd898b9f191932dc256dd30637bd6 /src/tusb_hal.h
parent861e7e6a7982c3e2b7e3c05b566eb06cd32b15c4 (diff)
parent734b3ada8a57ca4c8c90a7502c5547a891886481 (diff)
Merge pull request #18 from hathach/devlocal
Devlocal
Diffstat (limited to 'src/tusb_hal.h')
-rw-r--r--src/tusb_hal.h37
1 files changed, 9 insertions, 28 deletions
diff --git a/src/tusb_hal.h b/src/tusb_hal.h
index 85a2a8709..301e8c2f2 100644
--- a/src/tusb_hal.h
+++ b/src/tusb_hal.h
@@ -51,55 +51,37 @@ extern "C" {
//--------------------------------------------------------------------+
// HAL API
//--------------------------------------------------------------------+
-/** \ingroup group_mcu
- * \defgroup group_hal Hardware Abtract Layer (HAL)
- * Hardware Abstraction Layer (HAL) is an abstraction layer, between the physical hardware and the tinyusb stack.
- * Its function is to hide differences in hardware from most of MCUs, so that most of the stack code does not need to be changed to
- * run on systems with a different MCU.
- * HAL are sets of routines that emulate some platform-specific details, giving programs direct access to the hardware resources.
- * @{ */
-
-/** \brief Initialize USB controller hardware
- * \returns true if succeeded
- * \note This function is invoked by \ref tusb_init as part of the initialization.
- */
-bool tusb_hal_init(void);
-
-/** \brief Enable USB Interrupt on a specific USB Controller
- * \param[in] rhport is a zero-based index to identify USB controller's ID
- */
-void tusb_hal_int_enable(uint8_t rhport);
-
-/** \brief Disable USB Interrupt on a specific USB Controller
- * \param[in] rhport is a zero-based index to identify USB controller's ID
- */
-void tusb_hal_int_disable(uint8_t rhport);
// Only required to implement if using No RTOS (osal_none)
uint32_t tusb_hal_millis(void);
+// TODO remove
+extern void dcd_int_enable (uint8_t rhport);
+extern void dcd_int_disable(uint8_t rhport);
// Enable all ports' interrupt
+// TODO remove
static inline void tusb_hal_int_enable_all(void)
{
#ifdef CFG_TUSB_RHPORT0_MODE
- tusb_hal_int_enable(0);
+ dcd_int_enable(0);
#endif
#ifdef CFG_TUSB_RHPORT0_MODE
- tusb_hal_int_enable(1);
+ dcd_int_enable(1);
#endif
}
// Disable all ports' interrupt
+// TODO remove
static inline void tusb_hal_int_disable_all(void)
{
#ifdef CFG_TUSB_RHPORT0_MODE
- tusb_hal_int_disable(0);
+ dcd_int_disable(0);
#endif
#ifdef CFG_TUSB_RHPORT0_MODE
- tusb_hal_int_disable(1);
+ dcd_int_disable(1);
#endif
}
@@ -111,4 +93,3 @@ static inline void tusb_hal_int_disable_all(void)
#endif /* _TUSB_HAL_H_ */
-/** @} */