Provides the APIs for STOG.
Sub Modules | |
STOG Enumerated Data Types | |
TOG Low-Level API | |
Data Structures | |
struct | SDL_TOG_errInfo |
This structure contains timeout error information. More... | |
struct | SDL_TOG_config |
This structure contains TOG configuration information. More... | |
struct | SDL_TOG_staticRegs |
Slave TOG Static Registers. More... | |
Functions | |
int32_t | SDL_TOG_init (SDL_TOG_Inst instance, const SDL_TOG_config *pConfig) |
Initialize TOG module with respect of instance. More... | |
int32_t | SDL_TOG_verifyConfig (SDL_TOG_Inst instance, const SDL_TOG_config *pConfig) |
Verifying written configuration with TOG module. More... | |
int32_t | SDL_TOG_setIntrEnable (SDL_TOG_Inst instance, SDL_TOG_IntrSrc intrSrcs, bool enable) |
Enable/disable interrupt source(s) More... | |
int32_t | SDL_TOG_clrIntrPending (SDL_TOG_Inst instance, SDL_TOG_IntrSrc intrSrc) |
Clear pending interrupt source(s) More... | |
int32_t | SDL_TOG_getIntrPending (SDL_TOG_Inst instance, SDL_TOG_IntrSrc *pPendInts) |
Get masked (enabled) pending interrupt sources. More... | |
int32_t | SDL_TOG_ackIntr (SDL_TOG_Inst instance, SDL_TOG_IntrSrc intrSrc, uint32_t ackCnt) |
Ack interrupt source. More... | |
int32_t | SDL_TOG_start (SDL_TOG_Inst instance) |
Start the timer counter. More... | |
int32_t | SDL_TOG_stop (SDL_TOG_Inst instance) |
Stop the timer counter. More... | |
int32_t | SDL_TOG_reset (SDL_TOG_Inst instance) |
Reset the timeout functionality. More... | |
int32_t | SDL_TOG_getErrInfo (SDL_TOG_Inst instance, SDL_TOG_errInfo *pErrInfo) |
Get timeout error information. More... | |
int32_t | SDL_TOG_getStaticRegisters (SDL_TOG_Inst instance, SDL_TOG_staticRegs *pStaticRegs) |
Readback Static configuration registers. More... | |
int32_t | SDL_TOG_setFlushMode (SDL_TOG_Inst instance, bool enable) |
Enable/disable flush mode. More... | |
int32_t | SDL_TOG_getIntrCount (SDL_TOG_Inst instance, SDL_TOG_IntrSrc intrSrc, uint32_t *pIntrCnt) |
Get interrupt count. More... | |
TOG configuration flags | |
This is the SDL-FL API documentation for the VBUSM Slave Timeout Gasket module. The following procedure describes how to properly use this SDL-FL API:
| |
typedef uint8_t | SDL_TOG_cfgCtrl |
This enumerator defines the possible configuration flags. More... | |
#define | SDL_TOG_CFG_TIMEOUT 0x01U |
#define | SDL_TOG_CFG_INTR_PENDING 0x02U |
#define SDL_TOG_CFG_TIMEOUT 0x01U |
Timeout Configuration Flag
#define SDL_TOG_CFG_INTR_PENDING 0x02U |
Pending interrupt Configuration Flag
typedef uint8_t SDL_TOG_cfgCtrl |
This enumerator defines the possible configuration flags.
int32_t SDL_TOG_init | ( | SDL_TOG_Inst | instance, |
const SDL_TOG_config * | pConfig | ||
) |
Initialize TOG module with respect of instance.
This function allows software to initialize TOG module
The pConfig contains the timeout value and interrupt source
instance | [IN] TOG instance |
pConfig | [IN] Pointer to store the configuration |
int32_t SDL_TOG_verifyConfig | ( | SDL_TOG_Inst | instance, |
const SDL_TOG_config * | pConfig | ||
) |
Verifying written configuration with TOG module.
This function allows software to verifying TOG module
The pConfig contains the timeout value and interrupt source
instance | [IN] TOG instance |
pConfig | [IN] Pointer to store the configuration |
int32_t SDL_TOG_setIntrEnable | ( | SDL_TOG_Inst | instance, |
SDL_TOG_IntrSrc | intrSrcs, | ||
bool | enable | ||
) |
Enable/disable interrupt source(s)
This function allows software to enable or disable the specified interrupt source(s).
The intrSrcs value is composed of a logical OR of the desired interrupt sources defined in SDL_TOG_IntrSrc.
instance | [IN] TOG instance |
intrSrcs | [IN] Interrupt source(s) to set or clear |
enable | [IN] If true, the interrupt source(s) are enabled. If false, they are disabled. |
int32_t SDL_TOG_clrIntrPending | ( | SDL_TOG_Inst | instance, |
SDL_TOG_IntrSrc | intrSrc | ||
) |
Clear pending interrupt source(s)
This function allows software to clear the specified pending interrupt source(s).
The intrSrc value is composed of a logical OR of the desired interrupt sources defined in SDL_TOG_IntrSrc.
instance | [IN] TOG instance |
intrSrc | [IN] Interrupt source(s) to clear |
int32_t SDL_TOG_getIntrPending | ( | SDL_TOG_Inst | instance, |
SDL_TOG_IntrSrc * | pPendInts | ||
) |
Get masked (enabled) pending interrupt sources.
This function returns the masked (enabled) pending interrupt sources.
The value returned is a logical OR of the masked pending interrupt sources defined in SDL_TOG_IntrSrc.
instance | [IN] TOG instance |
pPendInts | [OUT] Pointer where pending interrupt sources is returned |
int32_t SDL_TOG_ackIntr | ( | SDL_TOG_Inst | instance, |
SDL_TOG_IntrSrc | intrSrc, | ||
uint32_t | ackCnt | ||
) |
Ack interrupt source.
This function acknowledges an interrupt source by decrementing the number of pending interrupts corresponding to the specified interrupt source intrSrc by the specified ackCnt count.
Valid values of intrSrc are:
SDL_EFAIL is returned if intrSrc is:
instance | [IN] TOG instance |
intrSrc | [IN] Interrupt source |
ackCnt | [IN] Decrement count |
int32_t SDL_TOG_start | ( | SDL_TOG_Inst | instance | ) |
Start the timer counter.
This function starts the timer counter.
instance | [IN] TOG instance |
int32_t SDL_TOG_stop | ( | SDL_TOG_Inst | instance | ) |
Stop the timer counter.
This function stops the timer counter.
instance | [IN] TOG instance |
int32_t SDL_TOG_reset | ( | SDL_TOG_Inst | instance | ) |
Reset the timeout functionality.
This function resets the timeout functionality by stopping the timer counter and clearing the timer and eon counters to 0. Note the eon bits represents the number of times free-running counter reached the configured timeout
Note that the timeout value set via the SDL_TOG_setTimeoutVal function is unaffected by this function.
instance | [IN] TOG instance |
int32_t SDL_TOG_getErrInfo | ( | SDL_TOG_Inst | instance, |
SDL_TOG_errInfo * | pErrInfo | ||
) |
Get timeout error information.
This function returns information about a captured transaction.
instance | [IN] TOG instance |
pErrInfo | [OUT] Pointer where the current number of occupied read slots is returned |
int32_t SDL_TOG_getStaticRegisters | ( | SDL_TOG_Inst | instance, |
SDL_TOG_staticRegs * | pStaticRegs | ||
) |
Readback Static configuration registers.
This function reads back configuration registers that are static.
instance | [IN] TOG instance |
pStaticRegs | [OUT] Pointer to store the read static registers |
int32_t SDL_TOG_setFlushMode | ( | SDL_TOG_Inst | instance, |
bool | enable | ||
) |
Enable/disable flush mode.
This function allows software to enable/disable flush mode.
instance | [IN] TOG instance |
enable | [IN] If true, flush mode is enabled. If false, it is disabled. |
int32_t SDL_TOG_getIntrCount | ( | SDL_TOG_Inst | instance, |
SDL_TOG_IntrSrc | intrSrc, | ||
uint32_t * | pIntrCnt | ||
) |
Get interrupt count.
This function returns the number of pending interrupts corresponding to the specified interrupt source intrSrc as follows: 0 = No pending interrupts 1 = One pending interrupt 2 = Two pending interrupts 3 = Three or more pending interrupts
Valid values of intrSrc are:
SDL_EFAIL is returned if intrSrc is:
instance | [IN] TOG instance |
intrSrc | [IN] Interrupt source |
pIntrCnt | [OUT] Pointer where interrupt count is returned |