#include "BBC/inline.h"
#include "BBC/SPIN_time.h"
Defines | |
| #define | SPIN__EXT_PROTO INLINE_USR_EXT_PROTO |
| External Prototype specification. | |
| #define | SPIN__EXT_FNC INLINE_USR_EXT_FNC |
| Internal Prototype specification. | |
| #define | SPIN__LCL_PROTO INLINE_USR_LCL_PROTO |
| External Function declaration. | |
| #define | SPIN__LCL_FNC INLINE_USR_LCL_FNC |
| Internal Function declaration. | |
Functions | |
| SPIN__EXT_PROTO unsigned int | SPIN__nsecs_to_ptus (unsigned int nanoseconds) |
| Converts a number of nanoseconds to PTUs. More... | |
| SPIN__EXT_PROTO unsigned int | SPIN__ptus_to_nsecs (unsigned int ptus) |
| SPIN__EXT_PROTO SPIN_time | SPIN__curtime (void) |
| Returns the current time in units of PTUs. More... | |
| SPIN__EXT_PROTO int | SPIN__wait (SPIN_time begin_ptu, unsigned int ptus) |
| Allows one to wait a specified time period after a start time. More... | |
| SPIN__EXT_PROTO int | SPIN__check (SPIN_time begin_ptu, unsigned int ptus) |
| Checks whether the requested amount of time has elapsed. More... | |
| SPIN__EXT_PROTO int | SPIN__spin (unsigned int ptus) |
| Places the CPU into a spin loop until the specified number of PTUs has elapsed. More... | |
|
||||||||||||
|
Checks whether the requested amount of time has elapsed.
is that this routine is used in a polling mode.
Note that in order to keep the interpretation of the return value uniform over the SPIN routines, the amount of time till expiration is returned as a negative number. A positive number indicates the amount of time past the expiration time. |
|
|
Returns the current time in units of PTUs.
The customary use of this routine is to strobe the starting time, then use the return value along with SPIN__check() or SPIN__wait() to allow a specified amount of time to elapsed from the starting time. |
|
|
Converts a number of nanoseconds to PTUs.
|
|
|
|
|
|
Places the CPU into a spin loop until the specified number of PTUs has elapsed.
|
|
||||||||||||
|
Allows one to wait a specified time period after a start time.
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001