aboutsummaryrefslogtreecommitdiffstats
path: root/wirish/wirish.c
diff options
context:
space:
mode:
Diffstat (limited to 'wirish/wirish.c')
-rw-r--r--wirish/wirish.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/wirish/wirish.c b/wirish/wirish.c
index 4281875..9f3b19e 100644
--- a/wirish/wirish.c
+++ b/wirish/wirish.c
@@ -39,6 +39,8 @@
#include "nvic.h"
#include "usb.h"
#include "rcc.h"
+#include "fsmc.h"
+#include "dac.h"
#include "flash.h"
void init(void) {
@@ -46,6 +48,14 @@ void init(void) {
flash_enable_prefetch();
flash_set_latency(FLASH_WAIT_STATE_2);
+ #if NR_FSMC > 0
+ fsmc_native_sram_init();
+ #endif
+
+ #if NR_DAC_PINS > 0
+ dac_init();
+ #endif
+
/* initialize clocks */
rcc_clk_init(RCC_CLKSRC_PLL, RCC_PLLSRC_HSE, RCC_PLLMUL_9);
rcc_set_prescaler(RCC_PRESCALER_AHB, RCC_AHB_SYSCLK_DIV_1);
@@ -60,5 +70,9 @@ void init(void) {
timer_init(2, 1);
timer_init(3, 1);
timer_init(4, 1);
+ #if NR_TIMERS >= 8
+ timer_init(5, 1);
+ timer_init(8, 1);
+ #endif
setupUSB();
}