/**
  ******************************************************************************
  * @file    hal.h
  * @author  Product application department
  * @version V1.0
  * @date    2020.02.13
  * @brief   Header file of HAL .
  *
  ******************************************************************************
  */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __HAL_H
#define __HAL_H

#ifdef __cplusplus
extern "C"
{
#endif

/* Includes ------------------------------------------------------------------*/
	
#include <string.h>
#include "type.h"
#include "uart_hal.h"
#include "cpm_hal.h"
#include "eflash_hal.h"


/**@defgroup HAL HAL driver
  *
  *@{
  */

/** @defgroup HAL_HAL HAL
  *
  *@{
  */

/*** 宏定义 *******************************************************************/
/** @defgroup HAL_Exported_Macros Exported Macros
  *
  * @{
  */ 
  #define EFLASH_BOOT     (2)
  #define SPIFLASH_BOOT   (3)
/**
  * @}
  */

/*** 全局变量声明 **************************************************************/
/** @defgroup HAL_Exported_Variables Exported Variables
  *
  * @{
  */
extern __IO uint32_t g_core_clk;
extern __IO uint32_t g_sdram_clk;
extern __IO uint32_t g_sys_clk;
extern __IO uint32_t g_ips_clk;
extern __IO uint32_t g_efm_clk;

/**
  * @}
  */


/*** 函数声明 ******************************************************************/
/** @defgroup HAL_Exported_Functions Exported Functions
  * @{
  */
  extern HAL_StatusTypeDef HAL_Init(void);
  extern HAL_StatusTypeDef HAL_DeInit (void);
  extern __weak HAL_StatusTypeDef HAL_InitTick (void);
  extern __weak void HAL_IncTick(void);
  //extern __weak uint32_t HAL_GetTick (void);
  extern __weak HAL_StatusTypeDef HAL_SuspendTick (void);
  extern __weak HAL_StatusTypeDef HAL_ResumeTick (void);
  extern __weak void HAL_Delay (__IO uint32_t Delay);
  extern void HAL_3v3LdoTakeOver(void);
  extern void HAL_PrintfVersion (void);
  extern HAL_StatusTypeDef HAL_GetSN(uint8_t *pSN);
  extern void HAL_RebackBoot(void);
  extern void HAL_RebackBoot(void);
  extern void HAL_DisBoot(void);
  extern void HAL_LockDisJtag(void);
	extern HAL_StatusTypeDef SysClk_SoftRstReconfig(void);

/**
  * @}
  */

/**
  *@}
  */

/**
  *@}
  */


#ifdef __cplusplus
}
#endif

#endif /* __HAL_H */

