mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-11-18 17:24:04 +01:00
uint32_t signature on usleep since the register read is 32bit...
This commit is contained in:
1 parent
c5c9c9bc13
commit
f4e34a56c6
2 files changed
+3
-3
No files matched your search
@@ -126,4 +126,4 @@ int mapCSP0(void);
|
||||
int initCycleCounter(void);
|
||||
|
||||
/** busy-wait for usecs on the core cycle counter */
|
||||
void usleep_bf(uint64_t us);
|
||||
void usleep_bf(uint32_t us);
|
||||
@@ -180,12 +180,12 @@ int initCycleCounter(void) {
|
||||
}
|
||||
|
||||
// usleep is not viable on blackfin (10 ms tick); spin on the core cycle counter
|
||||
void usleep_bf(uint64_t us) {
|
||||
void usleep_bf(uint32_t us) {
|
||||
#ifndef __bfin__
|
||||
usleep(us);
|
||||
#else
|
||||
uint32_t start = get_cycles();
|
||||
uint32_t wait = (uint32_t)(us * bfinCyclesPerUs); // valid below ~8 s
|
||||
uint32_t wait = us * bfinCyclesPerUs; // valid below ~8 s
|
||||
while ((uint32_t)(get_cycles() - start) < wait)
|
||||
;
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user