abstract usb enable/disable interrupt to hal layer

This commit is contained in:
hathach
2012-12-10 14:58:25 +07:00
parent b52b3b1cef
commit 3eb7465e5e
12 changed files with 218 additions and 29 deletions

View File

@@ -55,6 +55,7 @@
extern "C" {
#endif
#include "common/compiler/compiler.h"
#include "common/errors.h"
/** \brief USB hardware init
@@ -66,6 +67,23 @@
*/
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;
#if MCU == MCU_LPC11UXX
#include "hal_lpc11uxx.h"
#elif MCU == MCU_LPC13UXX
#include "hal_lpc13uxx.h"
#elif MCU == MCU_LPC43XX
#endif
#ifdef __cplusplus
}
#endif