aboutsummaryrefslogtreecommitdiff
path: root/src/ppu
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2023-04-04 18:04:41 +0200
committerlonkaars <loek@pipeframe.xyz>2023-04-04 18:04:41 +0200
commitbda744dc3ed0490bcbb22b22147b25e68a789f16 (patch)
tree5fa2c1f133c4acfda55f2c51e4d77cdca112de61 /src/ppu
parent9c0a8622c26743583966b653704d5bfc8b4c0c7d (diff)
remove pull down resistor for SPI SR and test new SPI transmit
Diffstat (limited to 'src/ppu')
-rw-r--r--src/ppu/stm.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/ppu/stm.c b/src/ppu/stm.c
index e1d7e5d..d588a65 100644
--- a/src/ppu/stm.c
+++ b/src/ppu/stm.c
@@ -8,18 +8,10 @@ void hh_ppu_init() {}
void hh_ppu_deinit() {}
void hh_ppu_vram_dwrite(uint8_t* data, size_t size) {
- // HAL_SPI_Transmit(&hspi1, data, size, HAL_MAX_DELAY);
- for (size_t i = 0; i < size; i += 4) {
- if (i+4 > size) break;
- uint8_t test[4] = { data[i+0], data[i+1], data[i+2], data[i+3], };
- HAL_SPI_Transmit(&hspi1, test, 4, HAL_MAX_DELAY);
- // HAL_Delay(100);
- }
+ 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_Delay(100); // TODO: remove
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_9, GPIO_PIN_RESET);
- // HAL_Delay(100); // TODO: remove
}