#ifndef _BSP_TIME_H
#define _BSP_TIME_H

#include "bsp.h"
#define SYSDIV 0 //时钟预分频
#define TIMER4_DIV 0x07//timer4预分频
#define TMIER4_DELAY 1 //ms
#define TIMER4_ARR (u8)(16000000u/pow(2,SYSDIV)/pow(2,TIMER4_DIV)/(1000/TMIER4_DELAY))
#define AUTO_SWITCH 1
#define Manual_SWITCH 0
extern u32 time_count4;
extern u16 time_count2;
extern u16 DelayMs;

void bsp_clk_init(void);
void bsp_time4_init(void);
void bsp_delay_ms(u16 ms);
void bsp_delay_s(u16 s);
void bsp_DelayMS(uint16_t ms);
void RtcConfig(void);
void SoftDelayMs(u32 ms);
#endif