diff options
| author | Vaarai | 2024-12-03 23:40:07 +0100 |
|---|---|---|
| committer | GitHub | 2024-12-03 23:40:07 +0100 |
| commit | e7f138831727aa0aecb0eb3b5959bfdd3a714567 (patch) | |
| tree | c9fa9637b0af2f8418c2c6fe4b2e16eeee139a35 /keyboards/cornia/cornia.c | |
| parent | f0eb2460d9e5b6e71ff76da3f341795ac53e1ec2 (diff) | |
Add cornia keyboard (#24442)
* Add cornia keyboard
* Update Fire keymap
* [Cornia/Doc] Host image on imgur
* [Cornia/config] Remove unnecessary defines
* [Cornia] Move I2C stuff to keyboard level
* [Cornia/config] Remove unnecessary defines & move all callbacks to keymap.c
* [Cornia] Use tri-layer in default keymap
* [Cornia/makefiles] remove license headers & root makefile
* [Cornia] Put common configuration to top keyboard level
* [Cornia] Remove unecessary custom keycodes
* [Cornia] Fix readme
* [Cornia] Fix RGB keycodes
* [Cornia] Fix config files
* [Cornia] Fix readme
* [Cornia] Fix mcuconf.h license
Diffstat (limited to 'keyboards/cornia/cornia.c')
| -rw-r--r-- | keyboards/cornia/cornia.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/keyboards/cornia/cornia.c b/keyboards/cornia/cornia.c new file mode 100644 index 0000000000..9a09047333 --- /dev/null +++ b/keyboards/cornia/cornia.c @@ -0,0 +1,44 @@ +/* Copyright 2024 Vaarai + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "cornia.h" + +// 'Cornia', 32x32px +#define OLED_LOGO_CORNIA {\ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, \ + 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xe0, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xf8, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xfd, 0xe1, \ + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, \ + 0x00, 0x00, 0xc0, 0xf8, 0xff, 0xff, 0xff, 0x3f, 0x07, 0x00, 0x00, 0x00, 0x07, 0x3f, 0xff, 0xff, \ + 0xff, 0xf8, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x1e, 0x1f, 0x1f, 0x1f, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, \ + 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x0e, 0x00 \ + } + +void cornia_render_logo(void) { +#ifdef OLED_ENABLE + static const char PROGMEM logo[] = OLED_LOGO_CORNIA; + oled_write_raw_P(logo, sizeof(logo)); +#endif +} + +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } + cornia_render_logo(); + return true; +} |