This functional group handles setting and reading the operational mode of the general purpose timers. The module version ID read function is also located here.
Sets the mode of the specified timer, the behavior that occurs when either the general-purpose timer counts down to zero or when the the global timer reaches its comparator value.
- Parameters
-
tmr_id | The timer identifier. |
mode | GPT_RESTART_MODE_ONESHOT - To select one-shot mode for the timer.
GPT_RESTART_MODE_PERIODIC - To select free-run mode for the timer. |
- Return values
-
ALT_E_SUCCESS | The operation was successful. |
ALT_E_ERROR | The operation failed. |
ALT_E_BAD_ARG | Invalid input argument. |
Reads the mode of the specified timer.
- Parameters
-
tmr_id | The timer identifier. |
- Return values
-
GPT_RESTART_MODE_ONESHOT | Timer is set to one-shot mode. |
GPT_RESTART_MODE_PERIODIC | Counter value is set to a user-defined value. |
ALT_E_BAD_ARG | Invalid input argument. |