diff options
author | lonkaars <loek@pipeframe.xyz> | 2023-03-30 15:10:17 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2023-03-30 15:10:17 +0200 |
commit | 6292c1101121bc8ba2db752cab3cbe41469b29d0 (patch) | |
tree | b8cc9ac68b2c972b67d8aa4c9da84ea8c415a759 /src/ppu/internals.h | |
parent | 54b6ca70a74b3beb1331fd0b0bed28c665ed1f4d (diff) |
new spi system
Diffstat (limited to 'src/ppu/internals.h')
-rw-r--r-- | src/ppu/internals.h | 10 |
1 files changed, 8 insertions, 2 deletions
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 <stdbool.h> +#include <stdlib.h> #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 */ |