AM62x MCU+ SDK  10.01.00
sdl_tog.h
Go to the documentation of this file.
1 
48 #ifndef SDL_TOG_H_
49 #define SDL_TOG_H_
50 
51 #ifdef __cplusplus
52 extern "C" {
53 #endif
54 
55 /* ========================================================================== */
56 /* Include Files */
57 /* ========================================================================== */
58 
59 #include <stdint.h>
60 #include <stdbool.h>
61 #include "sdlr_tog.h"
63 
98 /* ========================================================================== */
99 /* Macros & Typedefs */
100 /* ========================================================================== */
101 
111 typedef uint8_t SDL_TOG_cfgCtrl;
113 #define SDL_TOG_CFG_TIMEOUT 0x01U
114 
115 #define SDL_TOG_CFG_INTR_PENDING 0x02U
116 
118 /* ========================================================================== */
119 /* Structures */
120 /* ========================================================================== */
121 
126 typedef struct
127 {
129  uint32_t routeId;
131  uint32_t orderId;
133  uint32_t dir;
135  uint32_t type;
137  uint32_t tag;
140  uint32_t commandId;
145  uint32_t orgByteCnt;
149  uint32_t currByteCnt;
153  uint64_t address;
155 
159 typedef struct {
161  uint32_t timeoutVal;
164 
172 typedef struct {
173  uint32_t PID;
174  uint32_t CFG;
175  uint32_t ENABLE;
176  uint32_t FLUSH;
177  uint32_t TIMEOUT;
178  uint32_t ERR;
180 
181 /* ========================================================================== */
182 /* Function Declarations */
183 /* ========================================================================== */
184 
185 
199 int32_t SDL_TOG_init(SDL_TOG_Inst instance, const SDL_TOG_config *pConfig);
200 
214 int32_t SDL_TOG_verifyConfig(SDL_TOG_Inst instance, const SDL_TOG_config *pConfig);
215 
233 int32_t SDL_TOG_setIntrEnable( SDL_TOG_Inst instance, SDL_TOG_IntrSrc intrSrcs, bool enable );
234 
251 
266  int32_t SDL_TOG_getIntrPending(SDL_TOG_Inst instance, SDL_TOG_IntrSrc *pPendInts);
267 
290  int32_t SDL_TOG_ackIntr(SDL_TOG_Inst instance, SDL_TOG_IntrSrc intrSrc, uint32_t ackCnt);
291 
302  int32_t SDL_TOG_start(SDL_TOG_Inst instance);
303 
314  int32_t SDL_TOG_stop(SDL_TOG_Inst instance);
315 
332 int32_t SDL_TOG_reset(SDL_TOG_Inst instance);
333 
353  int32_t SDL_TOG_getErrInfo(SDL_TOG_Inst instance, SDL_TOG_errInfo *pErrInfo);
354 
367 
380 int32_t SDL_TOG_setFlushMode(SDL_TOG_Inst instance, bool enable);
381 
406 int32_t SDL_TOG_getIntrCount(SDL_TOG_Inst instance, SDL_TOG_IntrSrc intrSrc, uint32_t *pIntrCnt );
407 
412 #ifdef __cplusplus
413 }
414 #endif
415 
416 #endif /* SDL_TOG_H_ */
417 
418 /* nothing past this point */
SDL_TOG_staticRegs::ERR
uint32_t ERR
Definition: sdl_tog.h:178
sdl_tog_soc.h
SDL_TOG_getIntrCount
int32_t SDL_TOG_getIntrCount(SDL_TOG_Inst instance, SDL_TOG_IntrSrc intrSrc, uint32_t *pIntrCnt)
Get interrupt count.
SDL_TOG_errInfo::commandId
uint32_t commandId
Definition: sdl_tog.h:140
SDL_TOG_config::cfgCtrl
SDL_TOG_cfgCtrl cfgCtrl
Definition: sdl_tog.h:160
SDL_TOG_ackIntr
int32_t SDL_TOG_ackIntr(SDL_TOG_Inst instance, SDL_TOG_IntrSrc intrSrc, uint32_t ackCnt)
Ack interrupt source.
SDL_TOG_clrIntrPending
int32_t SDL_TOG_clrIntrPending(SDL_TOG_Inst instance, SDL_TOG_IntrSrc intrSrc)
Clear pending interrupt source(s)
SDL_TOG_getErrInfo
int32_t SDL_TOG_getErrInfo(SDL_TOG_Inst instance, SDL_TOG_errInfo *pErrInfo)
Get timeout error information.
SDL_TOG_errInfo::routeId
uint32_t routeId
Definition: sdl_tog.h:129
SDL_TOG_errInfo::dir
uint32_t dir
Definition: sdl_tog.h:133
SDL_TOG_config
This structure contains TOG configuration information.
Definition: sdl_tog.h:159
SDL_TOG_staticRegs::CFG
uint32_t CFG
Definition: sdl_tog.h:174
SDL_TOG_reset
int32_t SDL_TOG_reset(SDL_TOG_Inst instance)
Reset the timeout functionality.
SDL_TOG_staticRegs::FLUSH
uint32_t FLUSH
Definition: sdl_tog.h:176
SDL_TOG_config::intrSrcs
SDL_TOG_IntrSrc intrSrcs
Definition: sdl_tog.h:162
SDL_TOG_config::timeoutVal
uint32_t timeoutVal
Definition: sdl_tog.h:161
SDL_TOG_setIntrEnable
int32_t SDL_TOG_setIntrEnable(SDL_TOG_Inst instance, SDL_TOG_IntrSrc intrSrcs, bool enable)
Enable/disable interrupt source(s)
SDL_TOG_staticRegs::PID
uint32_t PID
Definition: sdl_tog.h:173
SDL_TOG_setFlushMode
int32_t SDL_TOG_setFlushMode(SDL_TOG_Inst instance, bool enable)
Enable/disable flush mode.
SDL_TOG_getIntrPending
int32_t SDL_TOG_getIntrPending(SDL_TOG_Inst instance, SDL_TOG_IntrSrc *pPendInts)
Get masked (enabled) pending interrupt sources.
SDL_TOG_cfgCtrl
uint8_t SDL_TOG_cfgCtrl
This enumerator defines the possible configuration flags.
Definition: sdl_tog.h:111
SDL_TOG_stop
int32_t SDL_TOG_stop(SDL_TOG_Inst instance)
Stop the timer counter.
SDL_TOG_verifyConfig
int32_t SDL_TOG_verifyConfig(SDL_TOG_Inst instance, const SDL_TOG_config *pConfig)
Verifying written configuration with TOG module.
SDL_TOG_IntrSrc
uint32_t SDL_TOG_IntrSrc
This enumerator defines the possible timeout interrupt sources.
Definition: sdl_ip_tog.h:107
SDL_TOG_staticRegs::ENABLE
uint32_t ENABLE
Definition: sdl_tog.h:175
SDL_TOG_errInfo::tag
uint32_t tag
Definition: sdl_tog.h:137
SDL_TOG_getStaticRegisters
int32_t SDL_TOG_getStaticRegisters(SDL_TOG_Inst instance, SDL_TOG_staticRegs *pStaticRegs)
Readback Static configuration registers.
SDL_TOG_errInfo::orgByteCnt
uint32_t orgByteCnt
Definition: sdl_tog.h:145
SDL_TOG_init
int32_t SDL_TOG_init(SDL_TOG_Inst instance, const SDL_TOG_config *pConfig)
Initialize TOG module with respect of instance.
SDL_TOG_errInfo::type
uint32_t type
Definition: sdl_tog.h:135
SDL_TOG_errInfo
This structure contains timeout error information.
Definition: sdl_tog.h:127
SDL_TOG_start
int32_t SDL_TOG_start(SDL_TOG_Inst instance)
Start the timer counter.
SDL_TOG_Inst
uint8_t SDL_TOG_Inst
Definition: sdl_soc_tog.h:61
sdlr_tog.h
SDL_TOG_staticRegs::TIMEOUT
uint32_t TIMEOUT
Definition: sdl_tog.h:177
SDL_TOG_errInfo::address
uint64_t address
Definition: sdl_tog.h:153
SDL_TOG_errInfo::orderId
uint32_t orderId
Definition: sdl_tog.h:131
SDL_TOG_errInfo::currByteCnt
uint32_t currByteCnt
Definition: sdl_tog.h:149
SDL_TOG_staticRegs
Slave TOG Static Registers.
Definition: sdl_tog.h:172