This library contains functions to register User IO Poll routines. User IO Poll routines are called at least every 4 milliseconds by the system task scheduler. These allow programs to put their applications to sleep while waiting for input, and register a polling routine that will be called to check for that input. The sleeping process can then be signalled to wake up from the polling routine.
For detailed information on the DS80C400 please see the High-Speed Microcontroller User's Guide: DS80C400 Supplement.
The functions in this library are multi-process safe--that is, if you call the same method from two different processes at the same time, the parameters to the function are preserved, and the function should execute correctly.
Go to the source code of this file.
Defines | |
| #define | ROM400_USERIOPOLL_VERSION 1 |
Functions | |
| unsigned char | useriopoll_isinstalled (void) |
| Checks to see if the User IO Poll library has already been initialized. | |
| void | useriopoll_init (unsigned char num_routines) |
| Initializes the User IO Poll library. | |
| unsigned char | useriopoll_registerpollroutine (void *funct, unsigned char number) |
| Registers an IO Poll routine. | |
| unsigned char | useriopoll_removepollroutine (unsigned char number) |
| Removes a registered IO Poll routine. | |
| void * | useriopoll_getpollroutine (unsigned char number) |
| Gets the address of a registered IO Poll routine. | |
| unsigned char | useriopoll_getlistsize (void) |
| Returns the number of polling routines allowed. | |
| unsigned int | useriopoll_version (void) |
| Returns the version number of this User IO Poll library. | |
|
|
Version number associated with this header file. Should be the same as the version number returned by the useriopoll_version function.
|
|
|
Returns the number of polling routines allowed. Returns the size of the internal array that holds the registered polling routines. This is the same as the number of entries that this library was initialized for. This number can be considered the bounds of valid indexes for the useriopoll_getpollroutine, useriopoll_removepollroutine, and useriopoll_registerpollroutine functions.
|
|
|
Gets the address of a registered IO Poll routine. Gets the address of an entry in the list of registered IO Poll routines. If no entry exists in the list at this location, this function returns NULL.
|
|
|
Initializes the User IO Poll library. Initializes memory space required by the User IO Poll library. The argument should be the maximum number of IO Poll routines that will be needed by the library. Internally, this is represented by an array of function pointers. Every 4 milliseconds (or more often), all the function pointers in the array are invoked (if they have been set). Therefore, it is in an application's best interest to make this number the lowest possible to reduce overhead. The functions registered as IO Poll routines should not destroy any registers aside from the following: psw, acc, dptr0. All other registers should be preserved.
|
|
|
Checks to see if the User IO Poll library has already been initialized. Checks to see if the useriopoll_init function has already been called. This function allows libraries to determine if they need to initialize this library or not.
|
|
||||||||||||
|
Registers an IO Poll routine. Registers the given IO Poll routine to be called by the task scheduler. The function will be installed in the list of functions at the position defined by number, even if a function already exists at that location.
|
|
|
Removes a registered IO Poll routine. Removes an entry in the list of registered IO Poll routines. If no entry exists in the list at this location, this function has no effect.
|
|
|
Returns the version number of this User IO Poll library.
|
| Copyright 2005 Dallas Semiconductor, Inc.. | Documentation generated by Doxygen. |