#ifndef DRV_CLK_H_
#define DRV_CLK_H_

#ifdef __cplusplus
extern "C" {
#endif 
#include "stm32f4xx.h"
#include "kit_core.h"

#define CLOCK_AHB_PRE            (1u)
#define CLOCK_APB1_PRE           (4u)
#define CLOCK_APB2_PRE           (2u)

#define CLOCK_SYS_FREQ           (168000000u)
#define CLOCK_HCLK_FREQ          (CLOCK_SYS_FREQ / CLOCK_AHB_PRE)
#define CLOCK_PCLK1_FREQ         (CLOCK_SYS_FREQ / CLOCK_APB1_PRE)
#define CLOCK_PCLK2_FREQ         (CLOCK_SYS_FREQ / CLOCK_APB2_PRE)

typedef enum
{
    kBspClk_APB1,
    kBspClk_APB2,
    kBspClk_APB3,
	kBspClk_End,
}BspClkType;

void      drv_clk_init(void);

KitResult drvSystemTick(uint8_t priority, uint16_t period, NoArgCall call);
#ifdef __cplusplus
}
#endif

#endif
