first commit

This commit is contained in:
valeh
2020-12-22 14:30:09 +02:00
commit 26b0ba5954
1832 changed files with 17777948 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
CC = gcc
CFLAGS = -g -W -Wall -Wextra -Wcast-qual -Wno-overlength-strings -Wno-unused-parameter -I../../../csrc/.
SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c
OBJ = $(SRC:.c=.o)
u8g2_utf8: $(OBJ)
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) -o u8g2_utf8
clean:
-rm $(OBJ) u8g2_utf8

View File

@@ -0,0 +1,36 @@
#include "u8g2.h"
#include <stdio.h>
u8g2_t u8g2;
int main(void)
{
u8g2_SetupBuffer_Utf8(&u8g2, U8G2_R0);
u8g2_InitDisplay(&u8g2);
u8g2_SetPowerSave(&u8g2, 0);
u8g2_SetFont(&u8g2, u8g2_font_6x13_mf);
u8g2_SetFontDirection(&u8g2, 0);
u8g2_FirstPage(&u8g2);
do
{
u8g2.draw_color = 1;
u8g2_DrawBox(&u8g2, 2, 8, 70, 20);
u8g2.draw_color = 0;
u8g2_DrawStr(&u8g2, 10, 14, "Hello World!");
u8g2.draw_color = 0;
u8g2_DrawBox(&u8g2, 9, 15, 31, 2);
} while( u8g2_NextPage(&u8g2) );
utf8_show();
return 0;
}