aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/rcc.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/rcc.c b/lib/rcc.c
index 47bcafb..30ad802 100644
--- a/lib/rcc.c
+++ b/lib/rcc.c
@@ -223,3 +223,14 @@ void rcc_osc_bypass_disable(osc_t osc)
break;
}
}
+
+void rcc_enable_peripheral_clock(volatile u32 *reg, u32 peripheral_en)
+{
+ *reg |= peripheral_en;
+}
+
+void rcc_disable_peripheral_clock(volatile u32 *reg, u32 peripheral_en)
+{
+ *reg &= ~peripheral_en;
+}
+