refrator, replace osal_tick_get / osal_tick_tock by tusb_tick_get

This commit is contained in:
hathach
2014-03-17 17:23:32 +07:00
parent eaf2e888ab
commit 23aa7070df
7 changed files with 137 additions and 121 deletions

View File

@@ -51,7 +51,7 @@
//--------------------------------------------------------------------+
// INTERNAL OBJECT & FUNCTION DECLARATION
//--------------------------------------------------------------------+
volatile uint32_t osal_tick_current = 0;
//volatile uint32_t osal_tick_current = 0;
//--------------------------------------------------------------------+
// IMPLEMENTATION

View File

@@ -56,18 +56,8 @@
//--------------------------------------------------------------------+
// TICK API
//--------------------------------------------------------------------+
extern volatile uint32_t osal_tick_current;
static inline void osal_tick_tock(void) ATTR_ALWAYS_INLINE;
static inline void osal_tick_tock(void)
{
osal_tick_current++;
}
static inline uint32_t osal_tick_get(void) ATTR_ALWAYS_INLINE;
static inline uint32_t osal_tick_get(void)
{
return osal_tick_current;
}
uint32_t tusb_tick_get(void);
#define osal_tick_get tusb_tick_get
//--------------------------------------------------------------------+
// TASK API