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


#ifndef MAINSOURCES_INCLUDE_IOS_EXTWDGMNGT_H_
#define MAINSOURCES_INCLUDE_IOS_EXTWDGMNGT_H_


#include "hal_stdtypes.h"
#include "Ios_Digital.h"
#include "Ios_DefineCatalog.h"


/*------------------------------------------------------------*/
/*          Constant definition                               */
/*------------------------------------------------------------*/

#define EXT_WDG_KICK_FUNC_CALL_RATE_MS  10

#define WDG_KICK_PULSEHIGH_LENGTH_MS    30 // Set at 30ms because Tboundary max= 23.5ms - This is to prevent a double rising edge within Tboundary max
#define WDG_KICK_PULSE_PERIOD_MS        500

#define WDG_FORCEKICK_ON_PULSE          10000 // ~1ms pulse

/*------------------------------------------------------------*/
/*          Public functions prototypes definition                   */
/*------------------------------------------------------------*/
extern void     fnIosKickExternalWdg(void);
extern uint16_t fnIosGetExtWgdLastKick(void);
extern void     fnIosForceExtrernalWdgKick(void);


#endif /* MAINSOURCES_INCLUDE_IOS_BOARDLEDMNGT_H_ */
