diff --git a/libs/include/cli.h b/libs/include/cli.h index a0403b8..1cadb0e 100644 --- a/libs/include/cli.h +++ b/libs/include/cli.h @@ -5,8 +5,10 @@ #define BLOCK_WIDTH 2 #define BLOCK_HEIGHT 8 -#define WIDTH 80/BLOCK_WIDTH -#define HEIGHT 80/BLOCK_HEIGHT +#define WIDTH 40 +#define HEIGHT 40 +#define CACHE_WIDTH WIDTH/BLOCK_WIDTH +#define CACHE_HEIGHT HEIGHT/BLOCK_HEIGHT // --- // |0 3| diff --git a/libs/source/cli.c b/libs/source/cli.c index e5a935b..1207aae 100644 --- a/libs/source/cli.c +++ b/libs/source/cli.c @@ -6,19 +6,19 @@ // 0x2800 - braille unicode offset // 0010 1000 : 0000 0000 -const char cli_bitmap[4][2] = { +const char cli_bitmap[BLOCK_HEIGHT][BLOCK_WIDTH] = { {0x01, 0x08}, {0x02, 0x10}, {0x04, 0x20}, {0x40, 0x80} }; -unsigned char cli_cache[HEIGHT][WIDTH] = {}; +unsigned char cli_cache[CACHE_HEIGHT][CACHE_WIDTH] = {}; void cli_fresh() { - for(unsigned char x = 0; x < WIDTH; x++) { - for(unsigned char y = 0; y < HEIGHT; y++) { + for(unsigned char x = 0; x < CACHE_WIDTH; x++) { + for(unsigned char y = 0; y < CACHE_HEIGHT; y++) { cli_drawBlock(&cli_cache[y][x]); } UART_CR(); diff --git a/src/main.c b/src/main.c index 66f0381..7d4db1a 100644 --- a/src/main.c +++ b/src/main.c @@ -186,9 +186,9 @@ void uart_debugPID() { void drawille_task() { while(1) { UART_CLEAR(); - cli_drawSpot(0,0); - cli_drawSpot(0,1); - cli_drawSpot(0,2); + for(unsigned char x = 0; x< WIDTH; x++) { + cli_drawSpot(x,x); + } cli_fresh(); } }