This functional group handles enabling, disabling, and reading the current enable state of the general purpose timers and the global timer.
ALT_STATUS_CODE alt_gpt_all_tmr_uninit |
( |
void |
| ) |
|
Uninitialize all of the general-purpose timer modules
ALT_STATUS_CODE alt_gpt_all_tmr_init |
( |
void |
| ) |
|
Initialize all of the general-purpose timer modules
Stop and disable the specified general purpose timer or global timer.
- Parameters
-
tmr_id | The timer identifier. |
- Return values
-
ALT_E_SUCCESS | The operation was successful. |
ALT_E_ERROR | The operation failed. |
ALT_E_BAD_ARG | Tried to stop an invalid timer. |
Enable and start the specified general purpose timer or global timer.
- Parameters
-
tmr_id | The timer identifier. |
- Return values
-
ALT_E_SUCCESS | The operation was successful. |
ALT_E_ERROR | The operation failed. |
ALT_E_BAD_ARG | Tried to start an invalid timer. |
Returns whether the specified timer is currently running or not. For the free-running 64-bit global timer, returns whether its comparison mode is enabled or not.
- Parameters
-
tmr_id | The timer identifier. |
- Return values
-
ALT_E_TRUE | The timer is currently enabled and running. |
ALT_E_FALSE | The timer is currently disabled and stopped. |
ALT_E_BAD_ARG | Tried to access an invalid timer. |
Restarts the specified general purpose timer with its original value. If used for the global timer, it updates the comparator value with the sum of the auto-increment value and the current global timer value and enables comparison mode.
- Parameters
-
tmr_id | The timer identifier. |
- Return values
-
ALT_E_SUCCESS | The operation was successful. |
ALT_E_ERROR | The operation failed. |
ALT_E_BAD_ARG | Tried to access an invalid timer. |