diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2024-12-04 00:20:36 -0700 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2024-12-04 00:20:36 -0700 |
commit | d6d04862de9126d0930ae1f4b95ff6077c6eda63 (patch) | |
tree | e5266c4017d41b1e77be8bbefa8abafb90fa1504 /src/init.c | |
parent | 47885d62b689bececb58b7bf9479a5c1ff1c9b5c (diff) | |
download | ch573-d6d04862de9126d0930ae1f4b95ff6077c6eda63.tar.gz ch573-d6d04862de9126d0930ae1f4b95ff6077c6eda63.tar.bz2 ch573-d6d04862de9126d0930ae1f4b95ff6077c6eda63.zip |
Basic interrupts are working.
Diffstat (limited to 'src/init.c')
-rw-r--r-- | src/init.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1,12 +1,17 @@ #include <stddef.h> #include <stdint.h> +#include <stdio.h> +#include "ch573/systick.h" #include "clock.h" #include "io.h" #include "isr_vector.h" void on_reset(void); +#define SYSTICK_I CH573_SYSTICK__SYSTICK_T_INTF +#define SYSTICK ch573_systick__systick + void __attribute__((weak, interrupt, __section__(".isr_vector.routines"))) default_irq_handler(void) { @@ -111,6 +116,7 @@ static __attribute((__section__(".sinit.1"))) void start(void) init_data_segments(); /* Set the mtvec to the isr_vector. */ set_mtvec(&isr_vector); + enable_interrupts(); /* Initialize stdout. */ init_uart1_for_stdout(); |