54#define _CMU_REG(i) MMIO32(CMU_BASE + ((i) >> 5))
55#define _CMU_BIT(i) (1 << ((i) & 0x1f))
#define CMU_OSCENCMD_LFXOEN
#define CMU_OSCENCMD_LFRCOEN
#define CMU_OSCENCMD_HFXOEN
#define CMU_STATUS_HFRCOSEL
#define CMU_STATUS_HFXORDY
#define CMU_CMD_HFCLKSEL_HFXO
#define CMU_OSCENCMD_USHFRCOEN
#define CMU_CMD_USBCCLKSEL_USHFRCO
#define CMU_STATUS_LFRCORDY
#define CMU_OSCENCMD_LFRCODIS
#define CMU_STATUS_AUXHFRCORDY
#define CMU_LOCK_LOCKKEY_UNLOCK
#define CMU_OSCENCMD_AUXHFRCOEN
#define CMU_OSCENCMD_HFXODIS
#define CMU_STATUS_LFRCOSEL
#define CMU_STATUS_HFXOSEL
#define CMU_OSCENCMD_HFRCOEN
#define CMU_STATUS_USHFRCORDY
#define CMU_STATUS_LFXORDY
#define CMU_STATUS_USBCLFXOSEL
#define CMU_CMD_HFCLKSEL_LFXO
#define CMU_LOCK_LOCKKEY_MASK
#define CMU_STATUS_USBCLFRCOSEL
#define CMU_LOCK_LOCKKEY_LOCK
#define CMU_STATUS_LFXOSEL
#define CMU_STATUS_USHFRCODIV2SEL
#define CMU_CMD_USBCCLKSEL_LFRCO
#define CMU_CMD_USBCCLKSEL_LFXO
#define CMU_CMD_HFCLKSEL_HFRCO
#define CMU_CMD_HFCLKSEL_USHFRCODIV2
#define CMU_OSCENCMD_LFXODIS
#define CMU_STATUS_USBCUSHFRCOSEL
#define CMU_STATUS_HFRCORDY
#define CMU_CMD_HFCLKSEL_LFRCO
#define CMU_OSCENCMD_HFRCODIS
#define CMU_OSCENCMD_USHFRCODIS
#define CMU_OSCENCMD_AUXHFRCODIS
#define CMU_LOCK_LOCKKEY_LOCKED
@ AUXHFRCO
Internal, 1-28Mhz.
@ USHFRCO
Internal, 48MHz.
@ HFRCO
Internal, 1 - 28Mhz.
@ LFRCO
Internal, 32.768kHz.
@ USHFRCODIV2
Internal, 24MHz.
@ LFXO
External, 32.768kHz.
void cmu_wait_for_usbclk_selected(enum cmu_osc osc)
Wait while USBCLK is not selected.
void cmu_osc_off(enum cmu_osc osc)
Turn off Oscillator.
enum cmu_osc cmu_get_hfclk_source(void)
Get HFCLK clock source.
void cmu_periph_clock_enable(enum cmu_periph_clken clken)
Enable Peripheral Clock in running mode.
void cmu_set_usbclk_source(enum cmu_osc osc)
Set USBCLK clock source.
void cmu_periph_clock_disable(enum cmu_periph_clken clken)
Disable Peripheral Clock in running mode.
bool cmu_get_lock_flag(void)
Get CMU register lock flag.
bool cmu_osc_ready_flag(enum cmu_osc osc)
Get Oscillator read flag.
void cmu_enable_lock(void)
Enable CMU registers lock.
void cmu_disable_lock(void)
Disable CMU registers lock.
void cmu_osc_on(enum cmu_osc osc)
Turn on Oscillator.
void cmu_set_hfclk_source(enum cmu_osc osc)
Set HFCLK clock source.
void cmu_wait_for_osc_ready(enum cmu_osc osc)
Wait while oscillator is not ready.