diff options
author | lonkaars <loek@pipeframe.xyz> | 2023-04-03 16:07:28 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2023-04-03 16:07:28 +0200 |
commit | 0545586aacc06add477b6df38cd50900698f6d9a (patch) | |
tree | efb8d86dc1343cb093ec7f7828270830cea81499 /src/stm32 | |
parent | 46bf4306575fa31fccaff19f0a592f8b40dd46cb (diff) |
worky but janky integration done
Diffstat (limited to 'src/stm32')
-rw-r--r-- | src/stm32/main.c | 3 | ||||
-rw-r--r-- | src/stm32/setup.c | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/stm32/main.c b/src/stm32/main.c index d815154..fb548d8 100644 --- a/src/stm32/main.c +++ b/src/stm32/main.c @@ -6,8 +6,9 @@ void hh_ppu_load_tilemap() {} void hh_loop() { + // TODO: call hh_ppu_vblank_interrupt on interrupt instead of manually while (1) { hh_ppu_vblank_interrupt(); - HAL_Delay(1e3); + HAL_Delay(16); } } diff --git a/src/stm32/setup.c b/src/stm32/setup.c index 4f56535..9de1f48 100644 --- a/src/stm32/setup.c +++ b/src/stm32/setup.c @@ -7,6 +7,7 @@ #include "main.h" #include "setup.h" +#include "demo.h" #include "ppu/ppu.h" UART_HandleTypeDef huart2 = { @@ -73,6 +74,7 @@ void hh_setup() { hh_io_tim_setup(); hh_ppu_init(); + hh_demo_setup(); } void hh_exit() { @@ -150,6 +152,7 @@ void hh_io_gpio_setup() { void HAL_MspInit() { __HAL_RCC_SYSCFG_CLK_ENABLE(); __HAL_RCC_PWR_CLK_ENABLE(); + HAL_NVIC_SetPriority(PendSV_IRQn, 3, 0); } void HAL_SPI_MspInit(SPI_HandleTypeDef* hspi) { |