libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
|
#include <libopencm3/sam/pm.h>
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) |
void pm_disable_peripheral_clock | ( | enum pm_peripheral | periph | ) |
Definition at line 72 of file pm.c.
References set_peripheral_clock_status().
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.
void pm_enable_peripheral_clock | ( | enum pm_peripheral | periph | ) |
Definition at line 67 of file pm.c.
References set_peripheral_clock_status().
void pm_select_main_clock | ( | enum mck_src | source_clock | ) |
Definition at line 30 of file pm.c.
References PM_MCCTRL, PM_MCCTRL_KEY, PM_MCCTRL_MCSEL_MASK, PM_MCCTRL_MCSEL_SHIFT, PM_SR, PM_SR_CKRDY, and PM_UNLOCK.
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.
|
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().