aboutsummaryrefslogtreecommitdiff
path: root/src/stm32
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2023-05-29 16:08:20 +0200
committerlonkaars <loek@pipeframe.xyz>2023-05-29 16:08:20 +0200
commit5cf7922107da55380e0cbc9c26d518db76eaf3ed (patch)
tree0f2ade7fe180cbadba596637f08d4efa6e683a6a /src/stm32
parent151ef82382104cfef375d8c1d256d72cb61b16fd (diff)
???
Diffstat (limited to 'src/stm32')
-rw-r--r--src/stm32/main.c6
-rw-r--r--src/stm32/setup.c12
2 files changed, 11 insertions, 7 deletions
diff --git a/src/stm32/main.c b/src/stm32/main.c
index 181657c..78b166e 100644
--- a/src/stm32/main.c
+++ b/src/stm32/main.c
@@ -1,9 +1,13 @@
#include <stm32f0xx_hal.h>
#include "main.h"
+#include "demo.h"
+#include "ppu/ppu.h"
void hh_ppu_load_tilemap() {}
void hh_loop() {
- while(g_hh_run);
+ while (1) {
+ hh_ppu_vblank_interrupt();
+ }
}
diff --git a/src/stm32/setup.c b/src/stm32/setup.c
index 7b9f35a..644d15e 100644
--- a/src/stm32/setup.c
+++ b/src/stm32/setup.c
@@ -165,10 +165,10 @@ void hh_io_gpio_setup() {
gpio_init(HH_IO_SPI_SR_PORT, HH_IO_SPI_SR_PIN, GPIO_MODE_OUTPUT_PP, GPIO_NOPULL);
// PPU HBLANK/VBLANK
- gpio_init(HH_IO_PPU_HBLANK_PORT, HH_IO_PPU_HBLANK_PIN, GPIO_MODE_INPUT, GPIO_NOPULL);
- gpio_init(HH_IO_PPU_VBLANK_PORT, HH_IO_PPU_VBLANK_PIN, GPIO_MODE_IT_RISING, GPIO_NOPULL);
- HAL_NVIC_SetPriority(EXTI4_15_IRQn, 0, 0);
- HAL_NVIC_EnableIRQ(EXTI4_15_IRQn);
+ // gpio_init(HH_IO_PPU_HBLANK_PORT, HH_IO_PPU_HBLANK_PIN, GPIO_MODE_INPUT, GPIO_NOPULL);
+ // gpio_init(HH_IO_PPU_VBLANK_PORT, HH_IO_PPU_VBLANK_PIN, GPIO_MODE_IT_RISING, GPIO_NOPULL);
+ // HAL_NVIC_SetPriority(EXTI4_15_IRQn, 0, 0);
+ // HAL_NVIC_EnableIRQ(EXTI4_15_IRQn);
// gamepad 1
gpio_init(HH_IO_GP1_UP_PORT, HH_IO_GP1_UP_PIN, GPIO_MODE_INPUT, GPIO_PULLDOWN);
@@ -251,8 +251,8 @@ void hh_io_setup_error_handler() {
}
void EXTI4_15_IRQHandler() {
- HAL_GPIO_EXTI_IRQHandler(HH_IO_PPU_HBLANK_PIN);
- HAL_GPIO_EXTI_IRQHandler(HH_IO_PPU_VBLANK_PIN);
+ // HAL_GPIO_EXTI_IRQHandler(HH_IO_PPU_HBLANK_PIN);
+ // HAL_GPIO_EXTI_IRQHandler(HH_IO_PPU_VBLANK_PIN);
}
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) {