![]() |
xiltimer
Vitis Drivers API Documentation
|
This header file contains sleep related APIs.
MODIFICATION HISTORY :
Ver Who Date Changes
1.0 adk 24/11/21 Initial release. 1.2 adk 22/12/22 Fixed doxygen style and indentation issues. 2.1 adk 11/09/24 Added missing prototype for msleep() API.
Macros | |
| #define | Xil_poll_timeout(IO_func, ADDR, VALUE, COND, TIMEOUT_US) |
| This macro polls an address periodically until a condition is met or till the timeout occurs. More... | |
Functions | |
| void | usleep (unsigned long useconds) |
| This API gives delay in usec. More... | |
| void | msleep (unsigned long mseconds) |
| This API gives delay in msec. More... | |
| void | sleep (unsigned int seconds) |
| This API gives delay in sec. More... | |
| #define Xil_poll_timeout | ( | IO_func, | |
| ADDR, | |||
| VALUE, | |||
| COND, | |||
| TIMEOUT_US | |||
| ) |
This macro polls an address periodically until a condition is met or till the timeout occurs.
The minimum timeout for calling this macro is 100us. If the timeout is less than 100us, it still waits for 100us. Also the unit for the timeout is 100us. If the timeout is not a multiple of 100us, it waits for a timeout of the next usec value which is a multiple of 100us.
| IO_func | - accessor function to read the register contents. Depends on the register width. |
| ADDR | - Address to be polled |
| VALUE | - variable to read the value |
| COND | - Condition to checked (usually involves VALUE) |
| TIMEOUT_US | - timeout in micro seconds |