HID: fix display width

This commit is contained in:
Lukas F. Hartmann 2022-08-26 17:07:21 +02:00
parent 69669556b3
commit 577e329809
1 changed files with 2 additions and 2 deletions

View File

@ -263,7 +263,7 @@ void matrix_render(struct CharacterMatrix *matrix) {
send_cmd3(PageAddr, 0, MatrixRows - 1); send_cmd3(PageAddr, 0, MatrixRows - 1);
send_cmd3(ColumnAddr, 0, (MatrixCols * FontWidth) - 1); send_cmd3(ColumnAddr, 0, (MatrixCols * FontWidth) - 1);
uint8_t buf[1 + MatrixRows * MatrixCols]; uint8_t buf[1 + MatrixRows * MatrixCols * FontWidth];
buf[0] = 0x40; buf[0] = 0x40;
int i = 1; int i = 1;
@ -279,7 +279,7 @@ void matrix_render(struct CharacterMatrix *matrix) {
} }
} }
} }
i2c_write_blocking(i2c0, SSD1306_ADDRESS, buf, 1 + MatrixRows * MatrixCols, false); i2c_write_blocking(i2c0, SSD1306_ADDRESS, buf, 1 + MatrixRows * MatrixCols * FontWidth, false);
matrix->dirty = false; matrix->dirty = false;
done: done: