diff options
| author | hathach <[email protected]> | 2014-03-18 16:10:25 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2014-03-18 16:10:25 +0700 |
| commit | 2c4a2e5b9e36436280b30cc12529b4027b589fbd (patch) | |
| tree | 2f678e307c408399e7ffed9dd2fdd2cf4e51caf5 /tinyusb/osal | |
| parent | fe1b39e539adcee6be4b9b8637a13debc3f6811c (diff) | |
rename TUSB_CFG_OS_TICKS_PER_SECOND to TUSB_CFG_TICKS_HZ
remove CFG_TICKS_PER_SECOND
Diffstat (limited to 'tinyusb/osal')
| -rw-r--r-- | tinyusb/osal/osal_common.h | 3 | ||||
| -rw-r--r-- | tinyusb/osal/osal_freeRTOS.h | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/tinyusb/osal/osal_common.h b/tinyusb/osal/osal_common.h index 6347abaea..0cf712e25 100644 --- a/tinyusb/osal/osal_common.h +++ b/tinyusb/osal/osal_common.h @@ -59,11 +59,10 @@ enum OSAL_TIMEOUT_WAIT_FOREVER = 0x0EEEEEEE
};
-// TODO refractor/remove this function and/or TUSB_CFG_OS_TICKS_PER_SECOND if using an RTOS
static inline uint32_t osal_tick_from_msec(uint32_t msec) ATTR_CONST ATTR_ALWAYS_INLINE;
static inline uint32_t osal_tick_from_msec(uint32_t msec)
{
- return (msec * TUSB_CFG_OS_TICKS_PER_SECOND)/1000;
+ return (msec * TUSB_CFG_TICKS_HZ)/1000;
}
#ifdef __cplusplus
diff --git a/tinyusb/osal/osal_freeRTOS.h b/tinyusb/osal/osal_freeRTOS.h index 942a0ea5b..5a904736f 100644 --- a/tinyusb/osal/osal_freeRTOS.h +++ b/tinyusb/osal/osal_freeRTOS.h @@ -91,7 +91,7 @@ static inline tusb_error_t osal_task_create(osal_task_t *task) static inline void osal_task_delay(uint32_t msec) ATTR_ALWAYS_INLINE; static inline void osal_task_delay(uint32_t msec) { - vTaskDelay( (TUSB_CFG_OS_TICKS_PER_SECOND * msec) / 1000 ); + vTaskDelay( (TUSB_CFG_TICKS_HZ * msec) / 1000 ); } //--------------------------------------------------------------------+ |
