

#ifndef __COTREX_A_GENERIC_TIMER_H
#define __COTREX_A_GENERIC_TIMER_H

#ifdef __cplusplus
extern "C" {
#endif

/*****************************************************************************/

/*
** Definitions
*/

#define GTIMER_PL1_CNTP_CTL_IMASK_DIS     (0) 
#define GTIMER_PL1_CNTP_CTL_IMASK_EN      (1) 
#define GTIMER_PL1_CNTP_CTL_ENABLE_DIS    (0) 
#define GTIMER_PL1_CNTP_CTL_ENABLE_EN     (1) 



/*
** API prototypes
*/
extern unsigned int GTimer_getCounterFrequency(void);
//extern unsigned int GTimer_setCounterFrequency(unsigned int frequency);
extern long long GTimer_getPhysicalCounter(void);
extern unsigned int GTimer_getPL1PhyTmrCtrl(void);
extern void GTimer_setPL1PhyTmrCtrl(unsigned int imask, unsigned int enable);
extern unsigned int GTimer_getPL1PhyTmrTmrValue(void);
extern void GTimer_setPL1PhyTmrTmrValue(unsigned int tVal);
extern long long GTimer_getPL1PhyTmrCmpValue(void);
extern void GTimer_setPL1PhyTmrCmpValue(unsigned int lo, unsigned int hi);

#ifdef __cplusplus
}
#endif
#endif /* __COTREX_A_GENERIC_TIMER_H */

