mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-30 04:00:02 +02:00
Stop using liba and the filesystem
This commit is contained in:
@@ -5,5 +5,5 @@ EPSILON_TELEMETRY ?= 0
|
||||
|
||||
HANDY_TARGETS_EXTENSIONS = bin
|
||||
|
||||
USE_LIBA = 1
|
||||
# USE_LIBA = 1
|
||||
POINCARE_TREE_LOG = 0
|
||||
|
||||
@@ -43,5 +43,5 @@ ion_src := $(filter-out $(sdl_simu_needs_to_be_removed),$(ion_src))
|
||||
|
||||
SFLAGS := $(filter-out -Iion/src/simulator/external/sdl/include,$(SFLAGS))
|
||||
|
||||
SFLAGS += -fno-stack-protector
|
||||
LDFLAGS += -nodefaultlibs
|
||||
# SFLAGS += -fno-stack-protector
|
||||
# LDFLAGS += -nodefaultlibs
|
||||
|
||||
@@ -38,8 +38,8 @@ void draw() {
|
||||
// printf("draw\n");
|
||||
draw_count++;
|
||||
|
||||
if (draw_count == 60) {
|
||||
printf("draw_count == 60\n");
|
||||
if (draw_count == 10) {
|
||||
printf("draw_count == 10\n");
|
||||
|
||||
const KDColor* pixels = Framebuffer::address();
|
||||
// Loop over all the pixels excluding the status bar
|
||||
@@ -52,8 +52,13 @@ void draw() {
|
||||
}
|
||||
}
|
||||
printf("hash: %lu\n", hash);
|
||||
if (hash == 4352844898) {
|
||||
printf("SUCCESS\n");
|
||||
} else {
|
||||
printf("FAILURE\n");
|
||||
}
|
||||
|
||||
Framebuffer::writeToFile("test.bin");
|
||||
// Framebuffer::writeToFile("test.bin");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,16 +48,16 @@ void setActive(bool enabled) {
|
||||
}
|
||||
|
||||
void writeToFile(const char * filename) {
|
||||
// Write as a raw RGB565 file
|
||||
FILE * f = fopen(filename, "wb");
|
||||
if (f == NULL) {
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < Ion::Display::Width * Ion::Display::Height; i++) {
|
||||
uint16_t color = sPixels[i];
|
||||
fwrite(&color, 2, 1, f);
|
||||
}
|
||||
fclose(f);
|
||||
// // Write as a raw RGB565 file
|
||||
// FILE * f = fopen(filename, "wb");
|
||||
// if (f == NULL) {
|
||||
// return;
|
||||
// }
|
||||
// for (int i = 0; i < Ion::Display::Width * Ion::Display::Height; i++) {
|
||||
// uint16_t color = sPixels[i];
|
||||
// fwrite(&color, 2, 1, f);
|
||||
// }
|
||||
// fclose(f);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user