libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
pm.c File Reference
Include dependency graph for pm.c:

Go to the source code of this file.

Functions

void pm_select_main_clock (enum mck_src source_clock)
 
void pm_enable_clock_div (enum pm_cksel sel_target, uint8_t div)
 
void pm_set_divmask_clock (uint8_t mask)
 
static void set_peripheral_clock_status (enum pm_peripheral periph, bool on)
 
void pm_enable_peripheral_clock (enum pm_peripheral periph)
 
void pm_disable_peripheral_clock (enum pm_peripheral periph)
 

Function Documentation

◆ pm_disable_peripheral_clock()

void pm_disable_peripheral_clock ( enum pm_peripheral  periph)

Definition at line 72 of file pm.c.

References set_peripheral_clock_status().

Here is the call graph for this function:

◆ pm_enable_clock_div()

void pm_enable_clock_div ( enum pm_cksel  sel_target,
uint8_t  div 
)

Definition at line 37 of file pm.c.

References PM_CKSEL, PM_CKSEL_DIV, PM_CKSEL_KEY, PM_CKSEL_MASK, PM_SR, PM_SR_CKRDY, and PM_UNLOCK.

◆ pm_enable_peripheral_clock()

void pm_enable_peripheral_clock ( enum pm_peripheral  periph)

Definition at line 67 of file pm.c.

References set_peripheral_clock_status().

Here is the call graph for this function:

◆ pm_select_main_clock()

void pm_select_main_clock ( enum mck_src  source_clock)

◆ pm_set_divmask_clock()

void pm_set_divmask_clock ( uint8_t  mask)

Definition at line 47 of file pm.c.

References PM_PBADIVMASK, PM_PBADIVMASK_KEY, and PM_UNLOCK.

◆ set_peripheral_clock_status()

static void set_peripheral_clock_status ( enum pm_peripheral  periph,
bool  on 
)
static

Definition at line 53 of file pm.c.

References PM_MASK, PM_MASK_KEY, and PM_UNLOCK.

Referenced by pm_disable_peripheral_clock(), and pm_enable_peripheral_clock().

Here is the caller graph for this function: