mirror of
https://github.com/Valeh2012/PersonalVotingMachine
synced 2025-12-10 18:45:17 +02:00
first commit
This commit is contained in:
12
basic-setup/components/u8g2/sys/tga/hello_world_8x8/Makefile
Normal file
12
basic-setup/components/u8g2/sys/tga/hello_world_8x8/Makefile
Normal file
@@ -0,0 +1,12 @@
|
||||
CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` -DU8G2_16BIT
|
||||
|
||||
SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c
|
||||
|
||||
OBJ = $(SRC:.c=.o)
|
||||
|
||||
u8g2_tga: $(OBJ)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_tga
|
||||
|
||||
clean:
|
||||
-rm $(OBJ) u8g2_tga
|
||||
|
||||
19
basic-setup/components/u8g2/sys/tga/hello_world_8x8/main.c
Normal file
19
basic-setup/components/u8g2/sys/tga/hello_world_8x8/main.c
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
#include "u8x8.h"
|
||||
|
||||
u8x8_t u8x8;
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
u8x8_Setup_TGA_DESC(&u8x8);
|
||||
u8x8_InitDisplay(&u8x8);
|
||||
u8x8_SetPowerSave(&u8x8, 0);
|
||||
|
||||
u8x8_SetFont(&u8x8, u8x8_font_amstrad_cpc_extended_r );
|
||||
u8x8_DrawString(&u8x8, 0, 0, "Hello World!");
|
||||
|
||||
tga_save("u8x8.tga");
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user