projects
/
carl9170fw.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
carl9170 firmware: fix time accouting
[carl9170fw.git]
/
carlfw
/
include
/
timer.h
diff --git
a/carlfw/include/timer.h
b/carlfw/include/timer.h
index 7e4cb4cd69a2a5a4bebac5a8f4b38f206b7e1fd9..1c1c6cd4fa6f0f30c9f539c0a110c8f78baed5ee 100644
(file)
--- a/
carlfw/include/timer.h
+++ b/
carlfw/include/timer.h
@@
-47,7
+47,7
@@
static inline __inline uint32_t get_clock_counter(void)
*/
static inline __inline bool is_after_msecs(const uint32_t t0, const uint32_t msecs)
{
*/
static inline __inline bool is_after_msecs(const uint32_t t0, const uint32_t msecs)
{
- return ((get_clock_counter() - t0) / 1000) > (msecs * fw.ticks_per_
m
sec);
+ return ((get_clock_counter() - t0) / 1000) > (msecs * fw.ticks_per_
u
sec);
}
/*
}
/*
@@
-60,7
+60,7
@@
static inline __inline void delay(const uint32_t msec)
{
uint32_t t1, t2, dt, wt;
{
uint32_t t1, t2, dt, wt;
- wt = msec * fw.ticks_per_
m
sec;
+ wt = msec * fw.ticks_per_
u
sec;
t1 = get_clock_counter();
while (1) {
t1 = get_clock_counter();
while (1) {
@@
-79,7
+79,7
@@
static inline __inline void udelay(const uint32_t usec)
while (1) {
t2 = get_clock_counter();
dt = (t2 - t1);
while (1) {
t2 = get_clock_counter();
dt = (t2 - t1);
- if (dt >= (usec * fw.ticks_per_
m
sec))
+ if (dt >= (usec * fw.ticks_per_
u
sec))
break;
}
}
break;
}
}