diff options
| author | hathach <[email protected]> | 2018-07-23 22:36:29 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-07-23 22:36:29 +0700 |
| commit | 51903a60c51bd1006bec9266dbe1bfb35e282675 (patch) | |
| tree | b25038fe0b5294f76a4eba71edb397ebbcb3430b /src/common | |
| parent | 361928f42983bed4d10443668d8eb3db69ade80f (diff) | |
rename timeout_ API to tu_timeout API
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/tusb_timeout.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/common/tusb_timeout.h b/src/common/tusb_timeout.h index 400434708..7c51ff36f 100644 --- a/src/common/tusb_timeout.h +++ b/src/common/tusb_timeout.h @@ -54,26 +54,26 @@ extern "C" { typedef struct {
uint32_t start;
uint32_t interval;
-}timeout_timer_t;
+}tu_timeout_t;
-static inline void timeout_set(timeout_timer_t* tt, uint32_t msec)
+static inline void tu_timeout_set(tu_timeout_t* tt, uint32_t msec)
{
tt->interval = msec;
tt->start = tusb_hal_millis();
}
-static inline bool timeout_expired(timeout_timer_t* tt)
+static inline bool tu_timeout_expired(tu_timeout_t* tt)
{
return ( tusb_hal_millis() - tt->start ) >= tt->interval;
}
-static inline void timeout_blocking_wait(uint32_t msec)
+static inline void tu_timeout_wait(uint32_t msec)
{
- timeout_timer_t tt;
- timeout_set(&tt, msec);
+ tu_timeout_t tt;
+ tu_timeout_set(&tt, msec);
// blocking delay
- while ( !timeout_expired(&tt) ) { }
+ while ( !tu_timeout_expired(&tt) ) { }
}
#ifdef __cplusplus
|
