/******************************************************************************/
/* Williams Advanced Engineering Limited                     Copyright(C) 2021*/
/* Grove                                                  All rights reserved */
/*                                                                            */
/******************************************************************************/


#ifndef MAINSOURCES_INCLUDE_IOS_INTRTIMERCOUNTERMANAGEMENT_H_
#define MAINSOURCES_INCLUDE_IOS_INTRTIMERCOUNTERMANAGEMENT_H_

#include "hal_stdtypes.h"
#include "sys_common.h"
#include "rti.h"
#include "reg_rti.h"

/*------------------------------------------------------------*/
/*          Functions prototypes definition                   */
/*------------------------------------------------------------*/
/* Public */
extern void     fnIosIncrementTimerCounter      (void);
extern uint32   fnIosGet10msTimerCounterValue   (void);
extern void     fnIosResetTimerCounter          (void);
extern void     fnIosResetTick                  (void);
extern uint8    fnIosGetTick                    (void);
extern uint64   fnIosGetFreeRunningCounterValue64Bits (uint8 bCounterID); // Do not use it - Clarification on how this works required - Datasheet is not clear
extern uint32   fnIosGetFreeRunningCounterValue32Bits (uint8 bCounterID);
extern void     fnIosInitRTICountersFromNVM     (void);
extern void     fnIosSaveRTICountersToNVM       (void);

/* Private */

#endif /* MAINSOURCES_INCLUDE_IOS_INTRTIMERCOUNTERMANAGEMENT_H_ */
