Altera HWLIB  16.0
The Altera HW Manager API Reference Manual
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups
Enable, Disable, and Status

Description

This functional group handles enabling, disabling, and reading the current enable state of the general purpose timers and the global timer.

Functions

ALT_STATUS_CODE alt_gpt_all_tmr_uninit (void)
 
ALT_STATUS_CODE alt_gpt_all_tmr_init (void)
 
ALT_STATUS_CODE alt_gpt_tmr_stop (ALT_GPT_TIMER_t tmr_id)
 
ALT_STATUS_CODE alt_gpt_tmr_start (ALT_GPT_TIMER_t tmr_id)
 
ALT_STATUS_CODE alt_gpt_tmr_is_running (ALT_GPT_TIMER_t tmr_id)
 
ALT_STATUS_CODE alt_gpt_tmr_reset (ALT_GPT_TIMER_t tmr_id)
 

Function Documentation

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

ALT_STATUS_CODE alt_gpt_tmr_stop ( ALT_GPT_TIMER_t  tmr_id)

Stop and disable the specified general purpose timer or global timer.

Parameters
tmr_idThe timer identifier.
Return values
ALT_E_SUCCESSThe operation was successful.
ALT_E_ERRORThe operation failed.
ALT_E_BAD_ARGTried to stop an invalid timer.
ALT_STATUS_CODE alt_gpt_tmr_start ( ALT_GPT_TIMER_t  tmr_id)

Enable and start the specified general purpose timer or global timer.

Parameters
tmr_idThe timer identifier.
Return values
ALT_E_SUCCESSThe operation was successful.
ALT_E_ERRORThe operation failed.
ALT_E_BAD_ARGTried to start an invalid timer.
ALT_STATUS_CODE alt_gpt_tmr_is_running ( ALT_GPT_TIMER_t  tmr_id)

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_idThe timer identifier.
Return values
ALT_E_TRUEThe timer is currently enabled and running.
ALT_E_FALSEThe timer is currently disabled and stopped.
ALT_E_BAD_ARGTried to access an invalid timer.
ALT_STATUS_CODE alt_gpt_tmr_reset ( ALT_GPT_TIMER_t  tmr_id)

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_idThe timer identifier.
Return values
ALT_E_SUCCESSThe operation was successful.
ALT_E_ERRORThe operation failed.
ALT_E_BAD_ARGTried to access an invalid timer.