From 6292c1101121bc8ba2db752cab3cbe41469b29d0 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Thu, 30 Mar 2023 15:10:17 +0200 Subject: new spi system --- src/ppu/internals.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/ppu/internals.h') diff --git a/src/ppu/internals.h b/src/ppu/internals.h index 4a1726e..12c556e 100644 --- a/src/ppu/internals.h +++ b/src/ppu/internals.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include "ppu/types.h" @@ -18,11 +19,16 @@ typedef struct { /** @brief check if `addr` is a valid PPU address */ bool hh_ppu_vram_valid_address(hh_ppu_addr_t addr); -/** @brief direct write vram word (platform-specific implementation) */ -void hh_ppu_vram_dwrite(hh_ppu_addr_t addr, hh_ppu_data_t data); /** @brief write data block into vram */ void hh_ppu_vram_write(hh_s_ppu_vram_data data); +/** @brief add raw SPI data to ppu command buffer */ +void hh_ppu_vram_buffer(uint8_t data[4]); +/** @brief propagate command buffer (also handles SPI reset) */ +void hh_ppu_vram_flush(); +/** @brief write raw spi bytes in ppu format */ +void hh_ppu_vram_dwrite(uint8_t* data, size_t size); + /** @brief convert local background attribute memory entry to PPU format */ hh_s_ppu_vram_data hh_ppu_2nat_bam(hh_s_ppu_loc_bam_entry); /** @brief convert local foreground attribute memory entry to PPU format */ -- cgit v1.2.3