![]() |
PDK API Guide for J721E
|
===========================================================================
Functions | |
uint32_t | CSL_timermgrGetRevision (const CSL_TimermgrCfg *pCfg) |
Return revision of the timer_mgr module. More... | |
uint32_t | CSL_timermgrGetMaxTimers (const CSL_TimermgrCfg *pCfg) |
Return maximum number of timers available or being monitored. More... | |
int32_t | CSL_timermgrSetMaxTimers (CSL_TimermgrCfg *pCfg, uint32_t maxTimers) |
Sets the maximum number of timers to be monitored. More... | |
int32_t | CSL_timermgrSetTimerCnt (CSL_TimermgrCfg *pCfg, uint32_t timerNum, uint32_t timerCnt) |
Sets the counter value for a specific timer. More... | |
int32_t | CSL_timermgrSetTimerEnable (CSL_TimermgrCfg *pCfg, uint32_t timerNum, bool bEnable) |
Enable or disable a specific timer. More... | |
int32_t | CSL_timermgrEnableAllTimers (CSL_TimermgrCfg *pCfg) |
Enables all timers. More... | |
void | CSL_timermgrSetEnable (CSL_TimermgrCfg *pCfg, bool bEnable) |
Enable or disable the timer_mgr. More... | |
int32_t | CSL_timermgrIsTimerExpired (CSL_TimermgrCfg *pCfg, uint32_t timerNum) |
Return expiration status for a timer. More... | |
uint32_t | CSL_timermgrGetExpiredTimers (CSL_TimermgrCfg *pCfg, uint32_t *pExpiredTimerNums) |
Return a list of expired timers. More... | |
int32_t | CSL_timermgrTouchTimer (CSL_TimermgrCfg *pCfg, uint32_t timerNum) |
Touch a timer. More... | |
uint32_t | CSL_timermgrGetCurrCnt (const CSL_TimermgrCfg *pCfg) |
Return the current timer_mgr counter value. More... | |
int32_t | CSL_timermgrSetEventIdx (CSL_TimermgrCfg *pCfg, uint32_t timerNum, uint32_t eventIdx) |
Set the event index for a timer. More... | |
int32_t | CSL_timermgrGetEventIdx (CSL_TimermgrCfg *pCfg, uint32_t timerNum) |
Get the event index for a timer. More... | |
int32_t | CSL_timermgrEnableAutoReset (CSL_TimermgrCfg *pCfg, uint32_t timerNum, bool bEnable) |
Enable or disable the auto reset function for a timer. More... | |
uint32_t CSL_timermgrGetRevision | ( | const CSL_TimermgrCfg * | pCfg | ) |
Return revision of the timer_mgr module.
This function returns the contents of the timer_mgr revision register. Consult the timer_mgr module documentation for a description of the contents of the revision register.
pCfg | [IN] Pointer to the CSL_TimermgrCfg structure |
uint32_t CSL_timermgrGetMaxTimers | ( | const CSL_TimermgrCfg * | pCfg | ) |
Return maximum number of timers available or being monitored.
This function returns the maximum number of timers available or being monitored.
If this function is called before the CSL_timermgrSetMaxTimers function is called, the default maximum number of timers available is returned. Otherwise, the maxTimers value specified in the CSL_timermgrSetMaxTimers function call is returned.
pCfg | [IN] Pointer to the CSL_TimermgrCfg structure |
int32_t CSL_timermgrSetMaxTimers | ( | CSL_TimermgrCfg * | pCfg, |
uint32_t | maxTimers | ||
) |
Sets the maximum number of timers to be monitored.
This function sets the maximum number of timers to be monitored. All timer numbers >= to this value will be ignored by the timer_mgr.
This function will only operate when the timer_mgr is disabled. It is intended to be called during initial timer_mgr configuration.
pCfg | [IN] Pointer to the CSL_TimermgrCfg structure |
maxTimers | [IN] Max number of timers to monitor |
int32_t CSL_timermgrSetTimerCnt | ( | CSL_TimermgrCfg * | pCfg, |
uint32_t | timerNum, | ||
uint32_t | timerCnt | ||
) |
Sets the counter value for a specific timer.
This function sets the counter value for the specified timer.
This function is intended to be called during initial configuration of the timer_mgr (before it is enabled). It can be called during timer_mgr operation to change an active timer's counter value, but more commonly the CSL_timermgrTouchTimer function should be called to reload the timer's counter value.
pCfg | [IN] Pointer to the CSL_TimermgrCfg structure |
timerNum | [IN] Timer number (0..CSL_timermgrGetMaxTimers) |
timerCnt | [IN] Counter value |
int32_t CSL_timermgrSetTimerEnable | ( | CSL_TimermgrCfg * | pCfg, |
uint32_t | timerNum, | ||
bool | bEnable | ||
) |
Enable or disable a specific timer.
This function enables or disables the specified timer.
pCfg | [IN] Pointer to the CSL_TimermgrCfg structure |
timerNum | [IN] Timer number (0..CSL_timermgrGetMaxTimers) |
bEnable | [IN] true = enable timer, false = disable it |
int32_t CSL_timermgrEnableAllTimers | ( | CSL_TimermgrCfg * | pCfg | ) |
Enables all timers.
This function enables all timers (0..CSL_timermgrGetMaxTimers) that are currently configured in the timer_mgr.
This function will only operate when the timer_mgr is disabled. It is intended to be called during initial timer_mgr configuration.
pCfg | [IN] Pointer to the CSL_TimermgrCfg structure |
void CSL_timermgrSetEnable | ( | CSL_TimermgrCfg * | pCfg, |
bool | bEnable | ||
) |
Enable or disable the timer_mgr.
This function enables or disables the timer_mgr.
Before enabling the timer_mgr, you must set the maximum number of timers to be used (see CSL_timermgrSetMaxTimers), set the counter values for the desired timers (see CSL_timermgrSetTimerCnt), and enable desired timers (see CSL_timermgrSetTimerEnable and CSL_timermgrEnableAllTimers).
pCfg | [IN] Pointer to the CSL_TimermgrCfg structure |
bEnable | [IN] true = enable timer_mgr, false = disable it |
int32_t CSL_timermgrIsTimerExpired | ( | CSL_TimermgrCfg * | pCfg, |
uint32_t | timerNum | ||
) |
Return expiration status for a timer.
This function returns the expiration status for the specified timer.
pCfg | [IN] Pointer to the CSL_TimermgrCfg structure |
timerNum | [IN] Timer number (0..CSL_timermgrGetMaxTimers) |
uint32_t CSL_timermgrGetExpiredTimers | ( | CSL_TimermgrCfg * | pCfg, |
uint32_t * | pExpiredTimerNums | ||
) |
Return a list of expired timers.
This function returns an array of timer numbers corresponding to the timers that have expired.
Note that the array must be large enough to contain the maximum number of timers configured via the CSL_timermgrSetMaxTimers function.
pCfg | [IN] Pointer to the CSL_TimermgrCfg structure |
pExpiredTimerNums | [OUT] Pointer to an array where expired timer numbers are returned |
int32_t CSL_timermgrTouchTimer | ( | CSL_TimermgrCfg * | pCfg, |
uint32_t | timerNum | ||
) |
Touch a timer.
This function is used to touch (reload the count value) of the specified timer.
pCfg | [IN] Pointer to the CSL_TimermgrCfg structure |
timerNum | [IN] Timer number (0..CSL_timermgrGetMaxTimers) |
uint32_t CSL_timermgrGetCurrCnt | ( | const CSL_TimermgrCfg * | pCfg | ) |
Return the current timer_mgr counter value.
This function returns the current timer_mgr counter value.
pCfg | [IN] Pointer to the CSL_TimermgrCfg structure |
int32_t CSL_timermgrSetEventIdx | ( | CSL_TimermgrCfg * | pCfg, |
uint32_t | timerNum, | ||
uint32_t | eventIdx | ||
) |
Set the event index for a timer.
This function is used to set the event index for the specified timer.
pCfg | [IN] Pointer to the CSL_TimermgrCfg structure |
timerNum | [IN] Timer number (0..CSL_timermgrGetMaxTimers) |
eventIdx | [IN] Event index |
int32_t CSL_timermgrGetEventIdx | ( | CSL_TimermgrCfg * | pCfg, |
uint32_t | timerNum | ||
) |
Get the event index for a timer.
This function is used to get the event index for the specified timer.
pCfg | [IN] Pointer to the CSL_TimermgrCfg structure |
timerNum | [IN] Timer number (0..CSL_timermgrGetMaxTimers) |
int32_t CSL_timermgrEnableAutoReset | ( | CSL_TimermgrCfg * | pCfg, |
uint32_t | timerNum, | ||
bool | bEnable | ||
) |
Enable or disable the auto reset function for a timer.
This function enables or disables the auto reset function for the specified timer.
pCfg | [IN] Pointer to the CSL_TimermgrCfg structure |
timerNum | [IN] Timer number (0..CSL_timermgrGetMaxTimers) |
bEnable | [IN] true = enable auto reset, false = disable it |