/*! * \file xc_drv_calib.h * * \brief The header of xc_drv_calib.c * * \copyright Revised BSD License, see section \ref LICENSE. * * \code * * _ __ _ ________ _ * | |/ /(_)___ / ____/ /_ (_)___ * | // / __ \/ / / __ \/ / __ \ * / |/ / / / / /___/ / / / / /_/ / * /_/|_/_/_/ /_/\____/_/ /_/_/ .___/ * /_/ * (C) 2022-2025 XinChip * * \endcode * * \author ( XinChip ) Alex-J * * \author ( XinChip ) */ #ifndef _XC_DRV_CALIB_H_ #define _XC_DRV_CALIB_H_ /*----------------------------------------------------------------------------------- INCLUDE HEADE FILES ------------------------------------------------------------------------------------*/ #include #include #include "xc6xxx.h" /*------------------------------------------------------------------------------------ Macros -------------------------------------------------------------------------------------*/ #define RC32K_CALIB_BY_HW 0 /*------------------------------------------------------------------------------------ TypeDef -------------------------------------------------------------------------------------*/ typedef enum { LFREQ_GOOD = 0, LFREQ_LOWER, LFREQ_HIGHER, LFREQ_UNKNOW = 0xff } eLFREQ_Sta; typedef enum { CLOCK_RC_LFCLK_IN_32K = 32000, CLOCK_XTAL_LFCLK_IN_32K = 32768, } CLOCK_LowFreq_In_Typedef; /*------------------------------------------------------------------------------------ Global Variables -------------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------------ Inline Functions -------------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------------ Exported Functions -------------------------------------------------------------------------------------*/ void xc_rc32k_calib_by_hw(void); void xc_rc32k_calib_by_soft(void); void xc_rc32k_soft_calib_enable(void); void xc_rc32k_soft_calib_disable(void); void xc_rc32k_soft_calib_set(void); #endif // _XC_DRV_AOTIMER_H_