|
|
@ -0,0 +1,35 @@ |
|
|
|
#ifndef IS_VRAM_H_ |
|
|
|
#define IS_VRAM_H_ |
|
|
|
|
|
|
|
#include <stdint.h> |
|
|
|
|
|
|
|
#define MAX_XFERS 5 |
|
|
|
|
|
|
|
typedef struct { |
|
|
|
uint8_t *dest; |
|
|
|
const uint8_t *source; |
|
|
|
uint8_t size; |
|
|
|
} mem_xfer_t; |
|
|
|
|
|
|
|
extern mem_xfer_t mem_xfer_queue[MAX_XFERS]; |
|
|
|
extern uint8_t mem_xfer_queue_size; |
|
|
|
|
|
|
|
/** |
|
|
|
* @brief Initialize VRAM engine |
|
|
|
*/ |
|
|
|
void vram_init(void); |
|
|
|
|
|
|
|
/** |
|
|
|
* @brief Process VRAM memory transfers |
|
|
|
*/ |
|
|
|
void vram_update(void); |
|
|
|
|
|
|
|
#define vram_enqueue_mem_xfer(_dest, _source, _size) \ |
|
|
|
do { \ |
|
|
|
mem_xfer_t *node = &mem_xfer_queue[mem_xfer_queue_size++]; \ |
|
|
|
node->dest = (_dest); \ |
|
|
|
node->source = (_source); \ |
|
|
|
node->size = (_size); \ |
|
|
|
} while (0) |
|
|
|
|
|
|
|
#endif |