diff options
Diffstat (limited to 'src/ppu/stm.c')
-rw-r--r-- | src/ppu/stm.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ppu/stm.c b/src/ppu/stm.c index d588a65..6bd9f66 100644 --- a/src/ppu/stm.c +++ b/src/ppu/stm.c @@ -4,14 +4,16 @@ #include "ppu/internals.h" #include "stm32/setup.h" -void hh_ppu_init() {} +void hh_ppu_init() { + hh_ppu_update_aux((hh_s_ppu_loc_aux) { .sysreset = 1 }); +} + void hh_ppu_deinit() {} void hh_ppu_vram_dwrite(uint8_t* data, size_t size) { - HAL_SPI_Transmit(&hspi1, data, size, HAL_MAX_DELAY); - HAL_SPI_Transmit(&hspi1, (uint8_t[4]){ 0xff }, 4, HAL_MAX_DELAY); - // reset SPI HAL_GPIO_WritePin(GPIOA, GPIO_PIN_9, GPIO_PIN_SET); HAL_GPIO_WritePin(GPIOA, GPIO_PIN_9, GPIO_PIN_RESET); + HAL_SPI_Transmit_IT(&hspi1, data, size); + // HAL_SPI_Transmit_IT(&hspi1, (uint8_t[4]){ 0xff }, 4); } |