C++ refactoring, plus low-power support, plus software-based SPI CS

I'm backlogged.
This commit is contained in:
2019-04-13 15:08:02 -07:00
parent d5bfecedb2
commit 6747d6c831
54 changed files with 13193 additions and 7264 deletions

View File

@@ -148,7 +148,13 @@ void display_char_at(struct display *display, int *x_off, int y_off, char c, con
}
// TODO: Don't hardcode this
int byte_cols = 1;
int byte_cols = (g->cols / 8);
if (g->cols & 7) {
byte_cols++;
}
if (byte_cols & 1) {
byte_cols++;
}
for (size_t x = 0; x < g->cols; x++) {
for (size_t y = 0; y < g->rows; y++) {
int byte_x = x >> 3;