mirror of https://github.com/wolfSSL/wolfssl.git
Allow main to build when local debug flag is on
parent
af9d82963e
commit
4f80c7c94e
|
@ -69,17 +69,16 @@ void check(int depth) {
|
||||||
free(ptr);
|
free(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void mtime_sleep(uint64_t ticks) {
|
void mtime_sleep(uint32_t ticks) {
|
||||||
uint64_t now = CLINT_REG_MTIME;
|
uint32_t start = CLINT_REG_MTIME;
|
||||||
uint64_t then = now + ticks;
|
|
||||||
|
|
||||||
while((*mtime - now) < ticks) {
|
while((CLINT_REG_MTIME - start) < ticks) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void delay(int sec) {
|
void delay(uint32_t sec) {
|
||||||
uint64_t ticks = sec * RTC_FREQ;
|
uint32_t ticks = sec * RTC_FREQ;
|
||||||
mtime_sleep(ticks);
|
mtime_sleep(ticks);
|
||||||
}
|
}
|
||||||
#endif /* WOLFSSL_SIFIVE_RISC_V_DEBUG */
|
#endif /* WOLFSSL_SIFIVE_RISC_V_DEBUG */
|
||||||
|
|
Loading…
Reference in New Issue