188 #if defined(__cplusplus)
232 const bool isClockEnabled)
236 regValue |=
PCC_PCCn_CGC((isClockEnabled ==
true) ? 1UL : 0UL);
261 uint32_t clkSource, regValue;
311 uint32_t fractionalValue, regValue;
316 fractionalValue = 1U;
321 fractionalValue = 0U;
352 uint32_t dividerValue, regValue;
410 return (regValue == 0U) ?
false :
true;
577 return (regValue == 0U) ?
false :
true;
580 #if FEATURE_PCC_HAS_IN_USE_FEATURE
596 static inline bool PCC_HAL_GetPeripheralInUseMode(
const PCC_Type*
const base,
600 regValue = (regValue & PCC_PCCn_INUSE_MASK) >> PCC_PCCn_INUSE_SHIFT;
601 return (regValue == 0U) ?
false :
true;
608 #if defined(__cplusplus)
PCC peripheral instance clock configuration. Implements peripheral_clock_config_t_Class.
static void PCC_HAL_SetClockSourceSel(PCC_Type *const base, const clock_names_t clockName, const peripheral_clock_source_t clockSource)
Selects the clock source for a given peripheral For example, to select the FIRC source for ADC clock...
static void PCC_HAL_SetFracValueSel(PCC_Type *const base, const clock_names_t clockName, const peripheral_clock_frac_t fracValue)
Selects the fractional value for a given peripheral For example, to configure MULTIPLY_BY_ONE as frac...
#define PCC_PCCn_PCS_MASK
#define PCC_PCCn_FRAC_SHIFT
#define PCC_PCCn_CGC_MASK
static peripheral_clock_divider_t PCC_HAL_GetDividerSel(const PCC_Type *const base, const clock_names_t clockName)
Gets the selection of the divider value for a specific peripheral.
peripheral_clock_source_t clkSrc
#define PCC_PCCn_PCS_SHIFT
static void PCC_HAL_SetDividerValueSel(PCC_Type *const base, const clock_names_t clockName, const peripheral_clock_divider_t divValue)
Selects the divider value for a given peripheral For example, to configure DIVIDE_BY_ONE as divider v...
#define PCC_PCCn_PCD_SHIFT
peripheral_clock_config_t * peripheralClocks
peripheral_clock_source_t
PCC clock source select Implements peripheral_clock_source_t_Class.
static bool PCC_HAL_GetClockMode(const PCC_Type *const base, const clock_names_t clockName)
Gets the clock gate control mode.
peripheral_clock_divider_t
PCC divider value select Implements peripheral_clock_divider_t_Class.
clock_names_t
Clock names.
static void PCC_HAL_SetClockMode(PCC_Type *const base, const clock_names_t clockName, const bool isClockEnabled)
Enables/disables the clock for a given peripheral. For example, to enable the ADC0 clock...
static peripheral_clock_source_t PCC_HAL_GetClockSourceSel(const PCC_Type *const base, const clock_names_t clockName)
Gets the selection of a clock source for a specific peripheral.
static peripheral_clock_frac_t PCC_HAL_GetFracValueSel(const PCC_Type *const base, const clock_names_t clockName)
Gets the selection of the fractional value for a specific peripheral.
peripheral_clock_divider_t divider
const uint16_t clockNameMappings[CLOCK_NAME_COUNT]
Clock name mappings Constant array storing the mappings between clock names and peripheral clock cont...
#define PCC_PCCn_FRAC_MASK
#define PCC_PCCn_PR_SHIFT
peripheral_clock_frac_t frac
static bool PCC_HAL_GetPeripheralMode(const PCC_Type *const base, const clock_names_t clockName)
Tells whether a given peripheral is present or not.
void PCC_HAL_SetPeripheralClockConfig(PCC_Type *const base, const pcc_config_t *const config)
Set the peripheral clock configuration.
#define PCC_PCCn_PCD_MASK
peripheral_clock_frac_t
PCC fractional value select Implements peripheral_clock_frac_t_Class.
#define PCC_PCCn_CGC_SHIFT
__IO uint32_t PCCn[PCC_PCCn_COUNT]
PCC configuration. Implements pcc_config_t_Class.