aboutsummaryrefslogtreecommitdiff
path: root/keyboards/anavi
diff options
context:
space:
mode:
authorLeon Anavi <leon@anavi.org>2020-06-05 10:48:58 +0300
committerGitHub <noreply@github.com>2020-06-05 00:48:58 -0700
commitf4ff225c004702b030f01ea0da98f9e966b7de80 (patch)
treeb6151a1bc2c23f5232475084a9a71a981e5f156a /keyboards/anavi
parenta68b0ed9a25dcbfd616faabab10a123c3c0710fd (diff)
downloadqmk_firmware-f4ff225c004702b030f01ea0da98f9e966b7de80.tar.gz
qmk_firmware-f4ff225c004702b030f01ea0da98f9e966b7de80.zip
[Keyboard] keyboards/anavi: Add ANAVI Macro Pad 8 (#9164)
ANAVI Macro Pad 8 is an open source mini mechanical keyboard with 8 keys, backlit, addressable RGB WS2812B LED strip on the back and mini OLED display. Powered by ATmega 32U4 microcontroller and with microUSB connector. Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: Joel Challis <git@zvecr.com> Signed-off-by: Leon Anavi <leon@anavi.org>
Diffstat (limited to 'keyboards/anavi')
-rw-r--r--keyboards/anavi/macropad8/config.h72
-rw-r--r--keyboards/anavi/macropad8/glcdfont.c232
-rw-r--r--keyboards/anavi/macropad8/info.json12
-rw-r--r--keyboards/anavi/macropad8/keymaps/default/keymap.c61
-rw-r--r--keyboards/anavi/macropad8/keymaps/kodi/keymap.c68
-rw-r--r--keyboards/anavi/macropad8/macropad8.c1
-rw-r--r--keyboards/anavi/macropad8/macropad8.h11
-rw-r--r--keyboards/anavi/macropad8/readme.md18
-rw-r--r--keyboards/anavi/macropad8/rules.mk32
9 files changed, 507 insertions, 0 deletions
diff --git a/keyboards/anavi/macropad8/config.h b/keyboards/anavi/macropad8/config.h
new file mode 100644
index 000000000..e517d909d
--- /dev/null
+++ b/keyboards/anavi/macropad8/config.h
@@ -0,0 +1,72 @@
1/*
2Copyright 2020 Leon Anavi <leon@anavi.org>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#pragma once
19
20#include "config_common.h"
21
22/* USB Device descriptor parameter */
23#define VENDOR_ID 0xCEEB
24#define PRODUCT_ID 0x0001
25#define DEVICE_VER 0x0001
26#define MANUFACTURER ANAVI
27#define PRODUCT Macro Pad 8
28#define DESCRIPTION 8-key mechanical keyboard/keypad/macropad with backlit, mini OLED display and RGB LED strip
29
30/* key matrix size */
31#define MATRIX_ROWS 2
32#define MATRIX_COLS 4
33
34/*
35 * Keyboard Matrix Assignments
36 *
37 * Change this to how you wired your keyboard
38 * COLS: AVR pins used for columns, left to right
39 * ROWS: AVR pins used for rows, top to bottom
40 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
41 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
42 * NO_DIODE = switches are directly connected to AVR pins
43 *
44*/
45#define DIRECT_PINS { \
46 { D4, F6, B5, E6 }, \
47 { F5, F7, B4, C6 } \
48}
49
50#define BACKLIGHT_PIN D7
51#define BACKLIGHT_BREATHING
52#define BACKLIGHT_LEVELS 3
53#define RGBLIGHT_SLEEP
54
55#define UNUSED_PINS
56
57/* ws2812B RGB LED */
58#ifdef RGBLIGHT_ENABLE
59# define RGB_DI_PIN F4
60# define RGBLIGHT_ANIMATIONS
61# define RGBLED_NUM 4
62# define RGBLIGHT_HUE_STEP 10
63# define RGBLIGHT_SAT_STEP 17
64# define RGBLIGHT_VAL_STEP 17
65# define RGBLIGHT_LIMIT_VAL 255
66#endif
67
68#ifdef OLED_DRIVER_ENABLE
69# define OLED_DISPLAY_128X64
70# define OLED_TIMEOUT 60000
71# define OLED_FONT_H "keyboards/anavi/macropad8/glcdfont.c"
72#endif
diff --git a/keyboards/anavi/macropad8/glcdfont.c b/keyboards/anavi/macropad8/glcdfont.c
new file mode 100644
index 000000000..10ce3b345
--- /dev/null
+++ b/keyboards/anavi/macropad8/glcdfont.c
@@ -0,0 +1,232 @@
1#include "progmem.h"
2
3// Corne 8x6 font with QMK Firmware Logo
4// Online editor: https://helixfonteditor.netlify.com/
5
6// clang-format off
7const unsigned char font[] PROGMEM = {
80x00, 0x00, 0x00, 0x00, 0x00, 0x00,
90x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
100x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
110x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
120x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00,
130x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00,
140x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
150x00, 0x18, 0x3C, 0x18, 0x00, 0x00,
160xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00,
170x00, 0x18, 0x24, 0x18, 0x00, 0x00,
180xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00,
190x30, 0x48, 0x3A, 0x06, 0x0E, 0x00,
200x26, 0x29, 0x79, 0x29, 0x26, 0x00,
210x40, 0x7F, 0x05, 0x05, 0x07, 0x00,
220x40, 0x7F, 0x05, 0x25, 0x3F, 0x00,
230x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00,
240x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
250x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00,
260x14, 0x22, 0x7F, 0x22, 0x14, 0x00,
270x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00,
280x06, 0x09, 0x7F, 0x01, 0x7F, 0x00,
290x00, 0x66, 0x89, 0x95, 0x6A, 0x00,
300x60, 0x60, 0x60, 0x60, 0x60, 0x00,
310x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00,
320x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
330x10, 0x20, 0x7E, 0x20, 0x10, 0x00,
340x08, 0x08, 0x2A, 0x1C, 0x08, 0x00,
350x08, 0x1C, 0x2A, 0x08, 0x08, 0x00,
360x1E, 0x10, 0x10, 0x10, 0x10, 0x00,
370x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00,
380x30, 0x38, 0x3E, 0x38, 0x30, 0x00,
390x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00,
400x00, 0x00, 0x00, 0x00, 0x00, 0x00,
410x00, 0x00, 0x5F, 0x00, 0x00, 0x00,
420x00, 0x07, 0x00, 0x07, 0x00, 0x00,
430x14, 0x7F, 0x14, 0x7F, 0x14, 0x00,
440x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00,
450x23, 0x13, 0x08, 0x64, 0x62, 0x00,
460x36, 0x49, 0x56, 0x20, 0x50, 0x00,
470x00, 0x08, 0x07, 0x03, 0x00, 0x00,
480x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
490x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
500x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
510x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
520x00, 0x80, 0x70, 0x30, 0x00, 0x00,
530x08, 0x08, 0x08, 0x08, 0x08, 0x00,
540x00, 0x00, 0x60, 0x60, 0x00, 0x00,
550x20, 0x10, 0x08, 0x04, 0x02, 0x00,
560x3E, 0x51, 0x49, 0x45, 0x3E, 0x00,
570x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
580x72, 0x49, 0x49, 0x49, 0x46, 0x00,
590x21, 0x41, 0x49, 0x4D, 0x33, 0x00,
600x18, 0x14, 0x12, 0x7F, 0x10, 0x00,
610x27, 0x45, 0x45, 0x45, 0x39, 0x00,
620x3C, 0x4A, 0x49, 0x49, 0x31, 0x00,
630x41, 0x21, 0x11, 0x09, 0x07, 0x00,
640x36, 0x49, 0x49, 0x49, 0x36, 0x00,
650x46, 0x49, 0x49, 0x29, 0x1E, 0x00,
660x00, 0x00, 0x14, 0x00, 0x00, 0x00,
670x00, 0x40, 0x34, 0x00, 0x00, 0x00,
680x00, 0x08, 0x14, 0x22, 0x41, 0x00,
690x14, 0x14, 0x14, 0x14, 0x14, 0x00,
700x00, 0x41, 0x22, 0x14, 0x08, 0x00,
710x02, 0x01, 0x59, 0x09, 0x06, 0x00,
720x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00,
730x7C, 0x12, 0x11, 0x12, 0x7C, 0x00,
740x7F, 0x49, 0x49, 0x49, 0x36, 0x00,
750x3E, 0x41, 0x41, 0x41, 0x22, 0x00,
760x7F, 0x41, 0x41, 0x41, 0x3E, 0x00,
770x7F, 0x49, 0x49, 0x49, 0x41, 0x00,
780x7F, 0x09, 0x09, 0x09, 0x01, 0x00,
790x3E, 0x41, 0x41, 0x51, 0x73, 0x00,
800x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
810x00, 0x41, 0x7F, 0x41, 0x00, 0x00,
820x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
830x7F, 0x08, 0x14, 0x22, 0x41, 0x00,
840x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
850x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00,
860x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
870x3E, 0x41, 0x41, 0x41, 0x3E, 0x00,
880x7F, 0x09, 0x09, 0x09, 0x06, 0x00,
890x3E, 0x41, 0x51, 0x21, 0x5E, 0x00,
900x7F, 0x09, 0x19, 0x29, 0x46, 0x00,
910x26, 0x49, 0x49, 0x49, 0x32, 0x00,
920x03, 0x01, 0x7F, 0x01, 0x03, 0x00,
930x3F, 0x40, 0x40, 0x40, 0x3F, 0x00,
940x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
950x3F, 0x40, 0x38, 0x40, 0x3F, 0x00,
960x63, 0x14, 0x08, 0x14, 0x63, 0x00,
970x03, 0x04, 0x78, 0x04, 0x03, 0x00,
980x61, 0x59, 0x49, 0x4D, 0x43, 0x00,
990x00, 0x7F, 0x41, 0x41, 0x41, 0x00,
1000x02, 0x04, 0x08, 0x10, 0x20, 0x00,
1010x00, 0x41, 0x41, 0x41, 0x7F, 0x00,
1020x04, 0x02, 0x01, 0x02, 0x04, 0x00,
1030x40, 0x40, 0x40, 0x40, 0x40, 0x00,
1040x00, 0x03, 0x07, 0x08, 0x00, 0x00,
1050x20, 0x54, 0x54, 0x78, 0x40, 0x00,
1060x7F, 0x28, 0x44, 0x44, 0x38, 0x00,
1070x38, 0x44, 0x44, 0x44, 0x28, 0x00,
1080x38, 0x44, 0x44, 0x28, 0x7F, 0x00,
1090x38, 0x54, 0x54, 0x54, 0x18, 0x00,
1100x00, 0x08, 0x7E, 0x09, 0x02, 0x00,
1110x18, 0x24, 0x24, 0x1C, 0x78, 0x00,
1120x7F, 0x08, 0x04, 0x04, 0x78, 0x00,
1130x00, 0x44, 0x7D, 0x40, 0x00, 0x00,
1140x20, 0x40, 0x40, 0x3D, 0x00, 0x00,
1150x7F, 0x10, 0x28, 0x44, 0x00, 0x00,
1160x00, 0x41, 0x7F, 0x40, 0x00, 0x00,
1170x7C, 0x04, 0x78, 0x04, 0x78, 0x00,
1180x7C, 0x08, 0x04, 0x04, 0x78, 0x00,
1190x38, 0x44, 0x44, 0x44, 0x38, 0x00,
1200x7C, 0x18, 0x24, 0x24, 0x18, 0x00,
1210x18, 0x24, 0x24, 0x18, 0x7C, 0x00,
1220x7C, 0x08, 0x04, 0x04, 0x08, 0x00,
1230x48, 0x54, 0x54, 0x54, 0x24, 0x00,
1240x04, 0x04, 0x3F, 0x44, 0x24, 0x00,
1250x3C, 0x40, 0x40, 0x20, 0x7C, 0x00,
1260x1C, 0x20, 0x40, 0x20, 0x1C, 0x00,
1270x3C, 0x40, 0x30, 0x40, 0x3C, 0x00,
1280x44, 0x28, 0x10, 0x28, 0x44, 0x00,
1290x4C, 0x90, 0x90, 0x90, 0x7C, 0x00,
1300x44, 0x64, 0x54, 0x4C, 0x44, 0x00,
1310x00, 0x08, 0x36, 0x41, 0x00, 0x00,
1320x00, 0x00, 0x77, 0x00, 0x00, 0x00,
1330x00, 0x41, 0x36, 0x08, 0x00, 0x00,
1340x02, 0x01, 0x02, 0x04, 0x02, 0x00,
1350x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
1360x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1370x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1380x00, 0x00, 0x00, 0x00, 0xC0, 0xE0,
1390xF0, 0xF8, 0xF8, 0x18, 0x00, 0xC0,
1400xF0, 0xFC, 0xFE, 0xFF, 0xFF, 0xFF,
1410xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x00,
1420x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1430x00, 0x00, 0x80, 0xC0, 0xE0, 0xE0,
1440xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0,
1450xC0, 0x80, 0x00, 0x00, 0x00, 0x00,
1460x80, 0xC0, 0xE0, 0xE0, 0xE0, 0xE0,
1470xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0x80,
1480x00, 0x00, 0x00, 0xE0, 0xE0, 0xC0,
1490xC0, 0xE0, 0xE0, 0xE0, 0xE0, 0x00,
1500x00, 0xE0, 0xE0, 0xC0, 0xC0, 0xE0,
1510xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0x80,
1520x00, 0x00, 0x00, 0x00, 0x80, 0xC0,
1530xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0,
1540xE0, 0xE0, 0xC0, 0x80, 0x00, 0x00,
1550x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1560x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1570xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC,
1580xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00,
1590x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E,
1600x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00,
1610x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B,
1620x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00,
1630xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE,
1640xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00,
1650x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1660x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1670x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1680x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1690x00, 0x00, 0x00, 0xF8, 0xFC, 0xFE,
1700xFF, 0xE0, 0x00, 0xFF, 0xFF, 0xFF,
1710xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF,
1720xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
1730xFF, 0x1F, 0x07, 0x01, 0x00, 0x00,
1740x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1750x00, 0xFF, 0xFF, 0xFF, 0x81, 0x00,
1760x00, 0x00, 0x00, 0x00, 0x00, 0x81,
1770xC3, 0xC3, 0xC3, 0x00, 0x00, 0xFF,
1780xFF, 0xFF, 0x81, 0x00, 0x00, 0x00,
1790x00, 0x00, 0x00, 0x81, 0xFF, 0xFF,
1800xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
1810x01, 0x00, 0x00, 0x00, 0x00, 0x00,
1820x00, 0xFF, 0xFF, 0xFF, 0x01, 0x00,
1830x00, 0x00, 0x00, 0x01, 0xFF, 0xFF,
1840xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
1850x9D, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C,
1860x1C, 0x9D, 0xDF, 0xDF, 0xDF, 0x00,
1870x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1880x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1890x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F,
1900x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00,
1910x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F,
1920x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00,
1930x30, 0x7B, 0x7F, 0x78, 0x30, 0x20,
1940x20, 0x30, 0x78, 0x7F, 0x3B, 0x00,
1950x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F,
1960x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00,
1970x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1980x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1990x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2000x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2010x00, 0x00, 0x00, 0x03, 0x0F, 0x1F,
2020x3F, 0x3F, 0x3F, 0x3F, 0x1F, 0x1F,
2030x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x3F,
2040x3F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F,
2050x7F, 0x7C, 0x78, 0x78, 0x38, 0x1C,
2060x0F, 0x00, 0x00, 0x00, 0x00, 0x00,
2070x00, 0x00, 0x01, 0x03, 0x07, 0x07,
2080x07, 0x07, 0x07, 0x07, 0x07, 0x07,
2090x03, 0x01, 0x00, 0x00, 0x00, 0x00,
2100x01, 0x03, 0x07, 0x07, 0x07, 0x07,
2110x07, 0x07, 0x07, 0x07, 0x03, 0x01,
2120x00, 0x00, 0x00, 0x07, 0x07, 0x07,
2130x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2140x00, 0x07, 0x07, 0x07, 0x00, 0x00,
2150x00, 0x00, 0x00, 0x00, 0x07, 0x07,
2160x07, 0x00, 0x00, 0x00, 0x01, 0x03,
2170x07, 0x07, 0x07, 0x07, 0x07, 0x07,
2180x07, 0x07, 0x03, 0x01, 0x00, 0x00,
2190x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2200x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2210x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2220x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2230x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2240x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2250x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2260x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2270x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2280x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2290x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2300x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2310x00, 0x00, 0x00, 0x00, 0x00, 0x00,
232};
diff --git a/keyboards/anavi/macropad8/info.json b/keyboards/anavi/macropad8/info.json
new file mode 100644
index 000000000..bcdbb9532
--- /dev/null
+++ b/keyboards/anavi/macropad8/info.json
@@ -0,0 +1,12 @@
1{
2 "keyboard_name": "ANAVI Macro Pad 8",
3 "url": "",
4 "maintainer": "leon-anavi",
5 "width": 4,
6 "height": 2,
7 "layouts": {
8 "LAYOUT_ortho_2x4": {
9 "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}]
10 }
11 }
12}
diff --git a/keyboards/anavi/macropad8/keymaps/default/keymap.c b/keyboards/anavi/macropad8/keymaps/default/keymap.c
new file mode 100644
index 000000000..8cdf90280
--- /dev/null
+++ b/keyboards/anavi/macropad8/keymaps/default/keymap.c
@@ -0,0 +1,61 @@
1#include QMK_KEYBOARD_H
2
3#define _MAIN 0
4#define _FN 1
5
6#define KC_X0 LT(_FN, KC_ESC)
7
8const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
9 [_MAIN] = LAYOUT_ortho_2x4(
10 G(KC_D), KC_UP, C(KC_C), C(KC_V),
11 KC_LEFT, KC_DOWN, KC_RGHT, MO(_FN)
12 ),
13
14 [_FN] = LAYOUT_ortho_2x4(
15 RGB_TOG, RGB_MOD, RGB_M_R, RGB_M_SN,
16 BL_TOGG, BL_STEP, BL_BRTG, _______
17 )
18};
19
20#ifdef OLED_DRIVER_ENABLE
21oled_rotation_t oled_init_user(oled_rotation_t rotation) {
22 return OLED_ROTATION_180; // flips the display 180 degrees if offhand
23}
24
25void oled_task_user(void) {
26 // Host Keyboard Layer Status
27 oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false);
28 oled_write_P(PSTR("Active layer:"), false);
29
30 switch (get_highest_layer(layer_state)) {
31 case _MAIN:
32 oled_write_ln_P(PSTR("Main"), false);
33 break;
34 case _FN:
35 oled_write_ln_P(PSTR("FN"), false);
36 break;
37 default:
38 // Or use the write_ln shortcut over adding '\n' to the end of your string
39 oled_write_ln_P(PSTR("N/A"), false);
40 }
41
42 // Host Keyboard LED Status
43 led_t led_state = host_keyboard_led_state();
44 oled_write_P(PSTR("Num Lock: "), false);
45 oled_write_ln_P(led_state.num_lock ? PSTR("On") : PSTR("Off"), false);
46 oled_write_P(PSTR("Caps Lock: "), false);
47 oled_write_ln_P(led_state.caps_lock ? PSTR("On") : PSTR("Off"), false);
48 oled_write_P(PSTR("Scroll Lock: "), false);
49 oled_write_ln_P(led_state.scroll_lock ? PSTR("On") : PSTR("Off"), false);
50 oled_write_P(PSTR("Backlit: "), false);
51 oled_write_ln_P(is_backlight_enabled() ? PSTR("On") : PSTR("Off"), false);
52#ifdef RGBLIGHT_ENABLE
53 static char rgbStatusLine1[26] = {0};
54 snprintf(rgbStatusLine1, sizeof(rgbStatusLine1), "RGB Mode: %d", rgblight_get_mode());
55 oled_write_ln(rgbStatusLine1, false);
56 static char rgbStatusLine2[26] = {0};
57 snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val());
58 oled_write_ln(rgbStatusLine2, false);
59#endif
60}
61#endif
diff --git a/keyboards/anavi/macropad8/keymaps/kodi/keymap.c b/keyboards/anavi/macropad8/keymaps/kodi/keymap.c
new file mode 100644
index 000000000..17b00807e
--- /dev/null
+++ b/keyboards/anavi/macropad8/keymaps/kodi/keymap.c
@@ -0,0 +1,68 @@
1#include QMK_KEYBOARD_H
2
3#define _MAIN 0
4#define _FN 1
5
6#define KC_X0 LT(_FN, KC_ESC)
7
8#ifdef RGBLIGHT_ENABLE
9// How long (in ms) to wait between animation steps for the rainbow mode
10const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {60, 30, 15};
11// How long (in milliseconds) to wait between animation steps for each of the "Swirling rainbow" animations
12const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {20, 10, 4};
13#endif
14
15const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
16 [_MAIN] = LAYOUT_ortho_2x4(
17 KC_ESC, KC_UP, KC_ENTER, KC_X,
18 KC_LEFT, KC_DOWN, KC_RIGHT, MO(_FN)
19 ),
20
21 [_FN] = LAYOUT_ortho_2x4(
22 RGB_TOG, RGB_MOD, RGB_M_R, RGB_M_SN,
23 BL_TOGG, BL_STEP, BL_BRTG, _______
24 )
25};
26
27#ifdef OLED_DRIVER_ENABLE
28oled_rotation_t oled_init_user(oled_rotation_t rotation) {
29 return OLED_ROTATION_180; // flips the display 180 degrees if offhand
30}
31
32void oled_task_user(void) {
33 // Host Keyboard Layer Status
34 oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false);
35 oled_write_P(PSTR("Active layer:"), false);
36
37 switch (get_highest_layer(layer_state)) {
38 case _MAIN:
39 oled_write_ln_P(PSTR("Main"), false);
40 break;
41 case _FN:
42 oled_write_ln_P(PSTR("FN"), false);
43 break;
44 default:
45 // Or use the write_ln shortcut over adding '\n' to the end of your string
46 oled_write_ln_P(PSTR("N/A"), false);
47 }
48
49 // Host Keyboard LED Status
50 led_t led_state = host_keyboard_led_state();
51 oled_write_P(PSTR("Num Lock: "), false);
52 oled_write_ln_P(led_state.num_lock ? PSTR("On") : PSTR("Off"), false);
53 oled_write_P(PSTR("Caps Lock: "), false);
54 oled_write_ln_P(led_state.caps_lock ? PSTR("On") : PSTR("Off"), false);
55 oled_write_P(PSTR("Scroll Lock: "), false);
56 oled_write_ln_P(led_state.scroll_lock ? PSTR("On") : PSTR("Off"), false);
57 oled_write_P(PSTR("Backlit: "), false);
58 oled_write_ln_P(is_backlight_enabled() ? PSTR("On") : PSTR("Off"), false);
59#ifdef RGBLIGHT_ENABLE
60 static char rgbStatusLine1[26] = {0};
61 snprintf(rgbStatusLine1, sizeof(rgbStatusLine1), "RGB Mode: %d", rgblight_get_mode());
62 oled_write_ln(rgbStatusLine1, false);
63 static char rgbStatusLine2[26] = {0};
64 snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val());
65 oled_write_ln(rgbStatusLine2, false);
66#endif
67}
68#endif
diff --git a/keyboards/anavi/macropad8/macropad8.c b/keyboards/anavi/macropad8/macropad8.c
new file mode 100644
index 000000000..2859cd042
--- /dev/null
+++ b/keyboards/anavi/macropad8/macropad8.c
@@ -0,0 +1 @@
#include "macropad8.h"
diff --git a/keyboards/anavi/macropad8/macropad8.h b/keyboards/anavi/macropad8/macropad8.h
new file mode 100644
index 000000000..3ebee830d
--- /dev/null
+++ b/keyboards/anavi/macropad8/macropad8.h
@@ -0,0 +1,11 @@
1#pragma once
2
3#include "quantum.h"
4
5#define LAYOUT_ortho_2x4( \
6 k01, k02, k03, k04, \
7 k05, k06, k07, k08 \
8 ) { \
9 { k01, k02, k03, k04 }, \
10 { k05, k06, k07, k08 } \
11}
diff --git a/keyboards/anavi/macropad8/readme.md b/keyboards/anavi/macropad8/readme.md
new file mode 100644
index 000000000..20af44585
--- /dev/null
+++ b/keyboards/anavi/macropad8/readme.md
@@ -0,0 +1,18 @@
1# ANAVI Macro Pad 8
2
3
4ANAVI Macro Pad 8 is an open source mini mechanical keyboard with 8 keys, backlit, addressable RGB WS2812B LED strip on the back and mini OLED display. Powered by ATmega32U4 microcontroller and with microUSB connector.
5
6* Keyboard Maintainer: [Leon Anavi](https://github.com/leon-anavi)
7* Hardware Supported: ANAVI Macro Pad 8
8* Hardware Availability: [PCB Files](https://github.com/AnaviTechnology/anavi-macro-pad-8)
9
10Make example for this keyboard (after setting up your build environment):
11
12 qmk compile -kb anavi/macropad8 -km default
13
14Flash to ANAVI Macro Pad 8:
15
16 qmk flash -kb anavi/macropad8 -km default
17
18See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/anavi/macropad8/rules.mk b/keyboards/anavi/macropad8/rules.mk
new file mode 100644
index 000000000..498c27a20
--- /dev/null
+++ b/keyboards/anavi/macropad8/rules.mk
@@ -0,0 +1,32 @@
1# MCU name
2MCU = atmega32u4
3
4# Bootloader selection
5# Teensy halfkay
6# Pro Micro caterina
7# Atmel DFU atmel-dfu
8# LUFA DFU lufa-dfu
9# QMK DFU qmk-dfu
10# ATmega32A bootloadHID
11# ATmega328P USBasp
12BOOTLOADER = caterina
13
14# Build Options
15# change yes to no to disable
16#
17BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
18MOUSEKEY_ENABLE = yes # Mouse keys
19EXTRAKEY_ENABLE = yes # Audio control and System control
20CONSOLE_ENABLE = no # Console for debug
21COMMAND_ENABLE = no # Commands for debug and configuration
22NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
23BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
24MIDI_ENABLE = no # MIDI controls
25AUDIO_ENABLE = no # Audio output on port C6
26UNICODE_ENABLE = yes # Unicode
27BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
28RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
29OLED_DRIVER_ENABLE = yes # Enable Support for SSD1306 or SH1106 OLED Displays; Communicating over I2C
30
31# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
32SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend