aboutsummaryrefslogtreecommitdiffstats
path: root/driver_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'driver_init.c')
-rw-r--r--driver_init.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/driver_init.c b/driver_init.c
index 920593a..b324be8 100644
--- a/driver_init.c
+++ b/driver_init.c
@@ -126,9 +126,23 @@ void USB_DEVICE_INSTANCE_init(void)
USB_DEVICE_INSTANCE_PORT_init();
}
+struct flash_descriptor FLASH_0;
+
+void FLASH_0_CLOCK_init(void)
+{
+ hri_mclk_set_AHBMASK_NVMCTRL_bit(MCLK);
+}
+
+void FLASH_0_init(void)
+{
+ FLASH_0_CLOCK_init();
+ flash_init(&FLASH_0, NVMCTRL);
+}
+
void system_init(void)
{
init_mcu();
USB_DEVICE_INSTANCE_init();
+ FLASH_0_init();
}