58 lines
1.1 KiB
C
58 lines
1.1 KiB
C
/*
|
|
* timer.h
|
|
*
|
|
* Created on: Jun 29, 2022
|
|
* Author: Keith.Lloyd
|
|
*/
|
|
|
|
#ifndef TIMER_H_
|
|
#define TIMER_H_
|
|
#define TIME_1HR 360000 // should be 360000
|
|
#define TIME_2HR 2*TIME_1HR
|
|
#define TIME_3HR 3*TIME_1HR
|
|
#define TIME_4HR 4*TIME_1HR
|
|
#define TIME_5HR 5*TIME_1HR
|
|
#define TIME_6HR 6*TIME_1HR
|
|
#define TIME_7HR 7*TIME_1HR
|
|
#define TIME_8HR 8*TIME_1HR
|
|
#define TIME_9HR 9*TIME_1HR
|
|
#define TIME_0HR 10
|
|
#define DELAY_5S 500
|
|
#define DELAY_1S 100
|
|
#define DELAY_2S 200
|
|
#define DELAY_500MS 50
|
|
#define DELAY_250MS 25
|
|
#define DELAY_200MS 20
|
|
#define LOCK_OUT_DELAY DELAY_2S * 2
|
|
#define PSU_DELAY DELAY_250MS
|
|
#define KEY_LOCK_TIME DELAY_250MS * 2
|
|
|
|
void timer_init(void);
|
|
void Delay_Ticks(uint32_t Delay_Interval);
|
|
void Tx_TimeOut(void);
|
|
|
|
typedef enum {
|
|
DISABLED,
|
|
ENABLED
|
|
}TMR_MODE_t;
|
|
|
|
typedef enum {
|
|
SD_1_HR,
|
|
SD_2_HR,
|
|
SD_NEVER,
|
|
SD_NUM
|
|
}AUTO_SHUTDOWN_t;
|
|
|
|
typedef struct{
|
|
AUTO_SHUTDOWN_t autoShutdown; //auto shutdown setting
|
|
bool timerInitialized; //CTIMER has been initialized
|
|
} TIMER_t;
|
|
|
|
|
|
void tmr_ChangeAutoSDTimer(void);
|
|
uint8_t * tmr_GetAutoSDTimerString(void);
|
|
void TMR_Start(void);
|
|
void TMR_Stop(void);
|
|
|
|
#endif /* TIMER_H_ */
|