<< Previous | Next >> | |
|
char TAT1R_SetValue( int requestor, int value );
Description
- If not already in use, or if in a compatible use, allocates the TAT1R resource (sets a new or keeps the current TAT1R value) as requested. Also enables or disables the requestor's timer A1 cascade bit(s) in TACR or TBCR, as appropriate. When the timer B cascade from timer A1 is disabled in TBCR the timer B "clocked by PCLK/2" is then enabled.
- A run time error occurs if parameter(s) are invalid and also, this function is not reentrant.
NOTE This function does not attempt to manage interrupts that are associated with timers A or B; that work is left entirely up to the application. Parameters
- requestor
- The requestor of the TAT1R resource. Use exactly one of the following macros to specify the appropriate requestor:
- value
- Either the new TAT1R setting value (0 to 255, inclusive), or the macro
TAT1R_RELEASE_REQ
to release the TAT1R resource in use by the specified requestor.
Return Value
- The new or current TAT1R setting. The caller should check their requested new TAT1R value against this return value. If the two values are not the same, the caller may decide the return value is acceptable after all and make another request using the previous return value. A valid release request always succeeds; in this case there is no need for the caller to check the return value.
Library
- sys.lib
Dynamic C Functions | << Previous | Next >> | rabbit.com |