diff --git a/os_functions.h b/os_functions.h index 8e1d6c1..ab9d1da 100644 --- a/os_functions.h +++ b/os_functions.h @@ -37,8 +37,9 @@ extern "C" { #define MILLISECS_TO_TICKS(msec) (SECS_TO_TICKS(msec) / 1000) #define MICROSECS_TO_TICKS(usec) (SECS_TO_TICKS(usec) / 1000000) -#define usleep(usecs) OSSleepTicks(MICROSECS_TO_TICKS(usecs)) -#define sleep(secs) OSSleepTicks(SECS_TO_TICKS(secs)) +//To avoid conflicts with the unistd.h +#define os_usleep(usecs) OSSleepTicks(MICROSECS_TO_TICKS(usecs)) +#define os_sleep(secs) OSSleepTicks(SECS_TO_TICKS(secs)) #define FLUSH_DATA_BLOCK(addr) asm volatile("dcbf 0, %0; sync" : : "r"(((addr) & ~31))) #define INVAL_DATA_BLOCK(addr) asm volatile("dcbi 0, %0; sync" : : "r"(((addr) & ~31)))