【概述】
S32K3 系列的芯片的 RTD 驱动库对时钟系统进行了抽象,按照面向对象的思想将时钟系统的初始化抽成 Clock_Ip_ClockConfigType 结构体,对应的结构体定义如下:
/*!
* @brief Clock configuration structure.
* Implements Clock_Ip_ClockConfigType_Class
*/
typedef struct
{
uint32 ClkConfigId; /**< The ID for Clock configuration */
const Clock_Ip_RegisterValueType (*RegValues)[]; /**< Pointer to register values array */
uint8 IrcoscsCount; /**< IRCOSCs count */
uint8 XoscsCount; /**< XOSCs count */
uint8 PllsCount; /**< PLLs count */
uint8 SelectorsCount; /**< Selectors count */
uint8 DividersCount; /**< Dividers count */
uint8 DividerTriggersCount; /**< Divider triggers count */
uint8 FracDivsCount; /**< Fractional dividers count */
uint8 ExtClksCount; /**< External clocks count */
uint8 GatesCount; /**< Clock gates count */
uint8 PcfsCount; /**< Clock pcfs count */
uint8 CmusCount; /**< Clock cmus count */
uint8 ConfigureFrequenciesCount; /**< Configured frequencies count */
Clock_Ip_IrcoscConfigType Ircoscs[CLOCK_IP_IRCOSCS_NO]; /**< IRCOSCs */
Clock_Ip_XoscConfigType Xoscs[CLOCK_IP_XOSCS_NO]; /**< XOSCs */
Clock_Ip_PllConfigType Plls[CLOCK_IP_PLLS_NO]; /**< PLLs */
Clock_Ip_SelectorConfigType Selectors[CLOCK_IP_SELECTORS_NO];/**< Selectors */
Clock_Ip_DividerConfigType Dividers[CLOCK_IP_DIVIDERS_NO]; /**< Dividers */
Clock_Ip_DividerTriggerConfigType DividerTriggers[CLOCK_IP_DIVIDER_TRIGGERS_NO];/**< Divider triggers */
Clock_Ip_FracDivConfigType FracDivs[CLOCK_IP_FRACTIONAL_DIVIDERS_NO];/**< Fractional dividers */
Clock_Ip_ExtClkConfigType ExtClks[CLOCK_IP_EXT_CLKS_NO]; /**< External clocks */
Clock_Ip_GateConfigType Gates[CLOCK_IP_GATES_NO]; /**< Clock gates */
Clock_Ip_PcfsConfigType Pcfs[CLOCK_IP_PCFS_NO]; /**< Progressive clock switching */
Clock_Ip_CmuConfigType Cmus[CLOCK_IP_CMUS_NO]; /**< Clock cmus */
Clock_IP_SpecificPeriphConfigType SpecificPeriphalConfiguration; /**< Clock specific peripheral configuration */
Clock_Ip_ConfiguredFrequencyType ConfiguredFrequencies[CLOCK_IP_CONFIGURED_FREQUENCIES_NO]; /**< Configured frequency values */
} Clock_Ip_ClockConfigType;
我要赚赏金
