summaryrefslogtreecommitdiff
path: root/src/splash.c
blob: 828559afb678235554e78acbe2c3504a5db2cf4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "splash.h"

#include <pico/error.h>

const uint8_t splash_chars[64] = {
  0x20, 0xdf, 0xe9, 0x20, 0xa0, 0xa0, 0xa0, 0xa0, 0x20, 0xdf, 0xe9, 0x20, 0xa0, 0xa0, 0xa0, 0xa0,
  0x55, 0x55, 0x49, 0x49, 0xa0, 0xd5, 0xc9, 0xa0, 0x55, 0x55, 0x49, 0x49, 0xa0, 0xd5, 0xc9, 0xa0,
  0x4a, 0x57, 0x57, 0x4b, 0xa0, 0xca, 0xcb, 0xfe, 0x4a, 0x57, 0x57, 0x4b, 0xa0, 0xca, 0xcb, 0xfe,
  0x20, 0x4a, 0x4b, 0x20, 0xa0, 0xea, 0xf4, 0xa0, 0x20, 0x4a, 0x4b, 0x20, 0xa0, 0xea, 0xf4, 0xa0,
};

int splash_draw(ssd1306_t *display) {
  for (int i = 0; i < 64; i++) {
    int ret = ssd_putscr(display, splash_chars[i], false);
    if (ret < 0) {
      return ret;
    }
  }
  return PICO_OK;
}