mirror of
https://github.com/nacabaro/nacapet.git
synced 2026-10-01 07:31:38 +00:00
Initial commit
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#include "debug.h"
|
||||
|
||||
#include <freertos/FreeRTOS.h>
|
||||
|
||||
void debug_printFreeMemory() {
|
||||
size_t freeMemory = esp_get_free_heap_size();
|
||||
printf("[DEBUG] Free memory: %zu bytes\n", freeMemory);
|
||||
}
|
||||
|
||||
void debug_printAllSprites(uint16_t** sprite, uint8_t numSprites, uint8_t width, uint8_t height) {
|
||||
for (uint8_t i = 0; i < numSprites; i++) {
|
||||
printf("[DEBUG] Sprite %d:\n", i);
|
||||
for (uint8_t y = 0; y < height; y++) {
|
||||
printf("[DEBUG] Row %d: ", y);
|
||||
for (uint8_t x = 0; x < width; x++) {
|
||||
printf("%04X ", sprite[i][y * width + x]);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
#ifndef DEBUG_H
|
||||
#define DEBUG_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
void debug_printFreeMemory();
|
||||
void debug_printAllSprites(uint16_t** sprite, uint8_t numSprites, uint8_t width, uint8_t height);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user