summaryrefslogtreecommitdiffstats
path: root/app/font8x8.c
diff options
context:
space:
mode:
Diffstat (limited to 'app/font8x8.c')
-rw-r--r--app/font8x8.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/app/font8x8.c b/app/font8x8.c
index 4d49aa7..629a565 100644
--- a/app/font8x8.c
+++ b/app/font8x8.c
@@ -260,7 +260,7 @@ static uint8_t font8x8[][8] = {
};
void
-font8x8_put_ch (uint8_t * vram, unsigned ch, unsigned x, unsigned y)
+font8x8_put_ch (uint8_t *vram, unsigned ch, unsigned x, unsigned y)
{
unsigned shift = y & 7;
unsigned page = y >> 3;
@@ -269,22 +269,20 @@ font8x8_put_ch (uint8_t * vram, unsigned ch, unsigned x, unsigned y)
oled_blit_strip (vram, x, x + 8, 0xff << shift, shift, font8x8[ch]);
- if (shift)
- {
- x += SSD1306_WIDTH;
- shift = 8 - shift;
- oled_blit_strip (vram, x, x + 8, 0xff >> shift, -shift, font8x8[ch]);
- }
+ if (shift) {
+ x += SSD1306_WIDTH;
+ shift = 8 - shift;
+ oled_blit_strip (vram, x, x + 8, 0xff >> shift, -shift, font8x8[ch]);
+ }
}
void
-font8x8_put_str (uint8_t * vram, char *str, unsigned x, unsigned y)
+font8x8_put_str (uint8_t *vram, char *str, unsigned x, unsigned y)
{
- while (*str)
- {
- font8x8_put_ch (vram, *(str++), x, y);
- x += 8;
- }
+ while (*str) {
+ font8x8_put_ch (vram, * (str++), x, y);
+ x += 8;
+ }
}