stm32:l0: RCC: add osc_on/osc_off helpers
These are the routines that have custom switch cases, and aren't easy targets for pulling out.
This commit is contained in:
committed by
Karl Palsson
parent
160a644bc6
commit
f51698fff4
@@ -465,6 +465,11 @@ extern uint32_t rcc_ppre2_frequency;
|
||||
|
||||
/* --- Function prototypes ------------------------------------------------- */
|
||||
|
||||
enum rcc_osc {
|
||||
PLL, HSE, HSI48, HSI16, MSI, LSE, LSI
|
||||
};
|
||||
|
||||
|
||||
#define _REG_BIT(base, bit) (((base) << 5) + (bit))
|
||||
|
||||
enum rcc_periph_clken {
|
||||
@@ -596,6 +601,16 @@ enum rcc_periph_rst {
|
||||
|
||||
BEGIN_DECLS
|
||||
|
||||
void rcc_osc_on(enum rcc_osc osc);
|
||||
void rcc_osc_off(enum rcc_osc osc);
|
||||
void rcc_osc_bypass_enable(enum rcc_osc osc);
|
||||
void rcc_osc_bypass_disable(enum rcc_osc osc);
|
||||
void rcc_osc_ready_int_clear(enum rcc_osc osc);
|
||||
void rcc_osc_ready_int_enable(enum rcc_osc osc);
|
||||
void rcc_osc_ready_int_disable(enum rcc_osc osc);
|
||||
int rcc_osc_ready_int_flag(enum rcc_osc osc);
|
||||
void rcc_wait_for_osc_ready(enum rcc_osc osc);
|
||||
|
||||
/* TODO */
|
||||
|
||||
END_DECLS
|
||||
|
||||
Reference in New Issue
Block a user