1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- #ifndef _USER_ICU_H_
- #define _USER_ICU_H_
- #include "t_define.h"
- #include "t_bk3231sf.h"
- #define ICU_MCU_CLK_SRC_APH 0x00//for pph
- #define ICU_MCU_CLK_SRC_XTL_32K 0x00//for core when in normal mode
- #define ICU_MCU_CLK_SRC_XTL_16M 0x01//for core when in normal mode
- #define ICU_LPO_CLK_SRC_XTL_32K 0x00//for coer when in lowpower mode
- #define ICU_LPO_CLK_SRC_XTL_16M_DIV 0x01//for coer when in lowpower mode
- #define ICU_CLK_SRC_FREQ_32K 0x00
- #define ICU_CLK_SRC_FREQ_16M 0x01
- #define ICU_CLK_SRC_FREQ_DPLL_96M 0x10
- #define ICU_CLK_PRE_DIV_NONE 0
- #define ICU_CLK_EN 0
- #define ICU_CLK_DISEN 1
- #define ICU_PPH_CORE 0x00
- #define ICU_PPH_ADC 0x01
- #define ICU_PPH_UART 0x02
- #define ICU_PPH_I2C0 0x03
- #define ICU_PPH_I2C1 0x04
- #define ICU_PPH_SPI 0x05
- #define ICU_PPH_CEVA 0x06
- #define ICU_PPH_WD 0x07
- #define ICU_PPH_BK24 0x08
- #define ICU_PPH_LPO 0x09
- #define ICU_PPH_RTC 0x0A
- #define ICU_PPH_PWM0 0x0B
- #define ICU_PPH_PWM1 0x0C
- #define ICU_PPH_PWM2 0x0D
- #define ICU_PPH_PWM3 0x0E
- #define ICU_PPH_PWM4 0x0F
- #define ICU_PPH_PWM5 0x10
- #define ICU_PPH_TIMER 0x11
- #define ICU_PPH_GPIO 0x12
- void IcuPphCfg(uint8 pph, uint8 clksrc, uint8 clkfreq, uint8 clkprediv, uint8 clken, uint8 inten, uint8 wakeen, uint8 fiqprio);
- void IcuPphClkCfg(uint8 pph, uint8 clksrc, uint8 clkfreq, uint8 clkprediv, uint8 clken);
- void IcuPphIntCfg(uint8 pph, uint8 inten, uint8 wakeen, uint8 fiqprio);
- uint32 IcuPphGetIntSta(void);
- void IcuPphFiqCfg(uint8 en);
- void IcuPphIrqCfg(uint8 en);
- void IcuEnterDeepSleep(void);
- #endif
|