aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/tiger_lily/Makefile3
-rw-r--r--keyboards/tiger_lily/config.h147
-rw-r--r--keyboards/tiger_lily/keymaps/default/Makefile21
-rw-r--r--keyboards/tiger_lily/keymaps/default/config.h8
-rw-r--r--keyboards/tiger_lily/keymaps/default/keymap.c11
-rw-r--r--keyboards/tiger_lily/keymaps/default/readme.md1
-rw-r--r--keyboards/tiger_lily/matrix.c137
-rw-r--r--keyboards/tiger_lily/readme.md32
-rw-r--r--keyboards/tiger_lily/rules.mk71
-rw-r--r--keyboards/tiger_lily/tiger_lily.c63
-rw-r--r--keyboards/tiger_lily/tiger_lily.h50
11 files changed, 544 insertions, 0 deletions
diff --git a/keyboards/tiger_lily/Makefile b/keyboards/tiger_lily/Makefile
new file mode 100644
index 000000000..57b2ef62e
--- /dev/null
+++ b/keyboards/tiger_lily/Makefile
@@ -0,0 +1,3 @@
1ifndef MAKEFILE_INCLUDED
2 include ../../Makefile
3endif
diff --git a/keyboards/tiger_lily/config.h b/keyboards/tiger_lily/config.h
new file mode 100644
index 000000000..490819290
--- /dev/null
+++ b/keyboards/tiger_lily/config.h
@@ -0,0 +1,147 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
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#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xFEED
25#define PRODUCT_ID 0x6060
26#define DEVICE_VER 0x0001
27#define MANUFACTURER Bathroom Epiphanies
28#define PRODUCT tiger_lily
29#define DESCRIPTION Tiger Lily controller for the Filco Majestouch 2
30
31/*
32 * Frosty Flake Rev. 20140521 made by Bathroom Ephiphanies
33 * Ported from the Bathroom Epiphanies TMK Firmware:
34 * https://github.com/BathroomEpiphanies/epiphanies_tmk_keyboard/tree/master/be_controllers
35 *
36 */
37
38/* key matrix size */
39#define MATRIX_ROWS 8 // Row0 - Row7 in the schematic
40#define MATRIX_COLS 18 // ColA - ColR in the schematic
41
42/*
43 * Keyboard Matrix Assignments
44 */
45#define UNUSED_PINS { B0, C4, D3 }
46
47/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
48#define DEBOUNCING_DELAY 5
49
50/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
51#define LOCKING_SUPPORT_ENABLE
52/* Locking resynchronize hack */
53#define LOCKING_RESYNC_ENABLE
54
55/*
56 * Force NKRO
57 *
58 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
59 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
60 * makefile for this to work.)
61 *
62 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
63 * until the next keyboard reset.
64 *
65 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
66 * fully operational during normal computer usage.
67 *
68 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
69 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
70 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
71 * power-up.
72 *
73 */
74//#define FORCE_NKRO
75
76/*
77 * Magic Key Options
78 *
79 * Magic keys are hotkey commands that allow control over firmware functions of
80 * the keyboard. They are best used in combination with the HID Listen program,
81 * found here: https://www.pjrc.com/teensy/hid_listen.html
82 *
83 * The options below allow the magic key functionality to be changed. This is
84 * useful if your keyboard/keypad is missing keys and you want magic key support.
85 *
86 */
87
88/* key combination for magic key command */
89#define IS_COMMAND() ( \
90 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
91)
92
93/* control how magic key switches layers */
94//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
95//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
96//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
97
98/* override magic key keymap */
99//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
100//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
101//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
102//#define MAGIC_KEY_HELP1 H
103//#define MAGIC_KEY_HELP2 SLASH
104//#define MAGIC_KEY_DEBUG D
105//#define MAGIC_KEY_DEBUG_MATRIX X
106//#define MAGIC_KEY_DEBUG_KBD K
107//#define MAGIC_KEY_DEBUG_MOUSE M
108//#define MAGIC_KEY_VERSION V
109//#define MAGIC_KEY_STATUS S
110//#define MAGIC_KEY_CONSOLE C
111//#define MAGIC_KEY_LAYER0_ALT1 ESC
112//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
113//#define MAGIC_KEY_LAYER0 0
114//#define MAGIC_KEY_LAYER1 1
115//#define MAGIC_KEY_LAYER2 2
116//#define MAGIC_KEY_LAYER3 3
117//#define MAGIC_KEY_LAYER4 4
118//#define MAGIC_KEY_LAYER5 5
119//#define MAGIC_KEY_LAYER6 6
120//#define MAGIC_KEY_LAYER7 7
121//#define MAGIC_KEY_LAYER8 8
122//#define MAGIC_KEY_LAYER9 9
123//#define MAGIC_KEY_BOOTLOADER PAUSE
124//#define MAGIC_KEY_LOCK CAPS
125//#define MAGIC_KEY_EEPROM E
126//#define MAGIC_KEY_NKRO N
127//#define MAGIC_KEY_SLEEP_LED Z
128
129/*
130 * Feature disable options
131 * These options are also useful to firmware size reduction.
132 */
133
134/* disable debug print */
135//#define NO_DEBUG
136
137/* disable print */
138//#define NO_PRINT
139
140/* disable action features */
141//#define NO_ACTION_LAYER
142//#define NO_ACTION_TAPPING
143//#define NO_ACTION_ONESHOT
144//#define NO_ACTION_MACRO
145//#define NO_ACTION_FUNCTION
146
147#endif
diff --git a/keyboards/tiger_lily/keymaps/default/Makefile b/keyboards/tiger_lily/keymaps/default/Makefile
new file mode 100644
index 000000000..9d3df5964
--- /dev/null
+++ b/keyboards/tiger_lily/keymaps/default/Makefile
@@ -0,0 +1,21 @@
1# Build Options
2# change to "no" to disable the options, or define them in the Makefile in
3# the appropriate keymap folder that will get included automatically
4#
5BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
6MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
7EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
8CONSOLE_ENABLE = no # Console for debug(+400)
9COMMAND_ENABLE = yes # Commands for debug and configuration
10NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
11BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
12MIDI_ENABLE = no # MIDI controls
13AUDIO_ENABLE = no # Audio output on port C6
14UNICODE_ENABLE = no # Unicode
15BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
16RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
17SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
18
19ifndef QUANTUM_DIR
20 include ../../../../Makefile
21endif
diff --git a/keyboards/tiger_lily/keymaps/default/config.h b/keyboards/tiger_lily/keymaps/default/config.h
new file mode 100644
index 000000000..8893d122e
--- /dev/null
+++ b/keyboards/tiger_lily/keymaps/default/config.h
@@ -0,0 +1,8 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#include "../../config.h"
5
6// place overrides here
7
8#endif
diff --git a/keyboards/tiger_lily/keymaps/default/keymap.c b/keyboards/tiger_lily/keymaps/default/keymap.c
new file mode 100644
index 000000000..f4526dc59
--- /dev/null
+++ b/keyboards/tiger_lily/keymaps/default/keymap.c
@@ -0,0 +1,11 @@
1#include "tiger_lily.h"
2
3const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
4[0] = KEYMAP(\
5 KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \
6 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL,KC_BSPC, KC_INS,KC_HOME,KC_PGUP, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \
7 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_LBRC,KC_RBRC,KC_BSLS, KC_DEL, KC_END,KC_PGDN, KC_P7, KC_P8, KC_P9,KC_PPLS, \
8 KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,KC_SCLN,KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \
9 KC_LSFT,KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3,KC_PENT, \
10 KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT, KC_P0,KC_PDOT)
11}; \ No newline at end of file
diff --git a/keyboards/tiger_lily/keymaps/default/readme.md b/keyboards/tiger_lily/keymaps/default/readme.md
new file mode 100644
index 000000000..4626859df
--- /dev/null
+++ b/keyboards/tiger_lily/keymaps/default/readme.md
@@ -0,0 +1 @@
# The default keymap for tiger_lily
diff --git a/keyboards/tiger_lily/matrix.c b/keyboards/tiger_lily/matrix.c
new file mode 100644
index 000000000..d3a0d7ebd
--- /dev/null
+++ b/keyboards/tiger_lily/matrix.c
@@ -0,0 +1,137 @@
1/*
2 Copyright 2017 Gabriel Young <gabeplaysdrums@live.com>
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#include <stdint.h>
19#include <stdbool.h>
20#include <avr/io.h>
21#include <util/delay.h>
22#include "print.h"
23#include "debug.h"
24#include "util.h"
25#include "matrix.h"
26
27#ifndef DEBOUNCING_DELAY
28# define DEBOUNCING_DELAY 5
29#endif
30static uint8_t debouncing = DEBOUNCING_DELAY;
31
32static matrix_row_t matrix[MATRIX_ROWS];
33static matrix_row_t matrix_debouncing[MATRIX_ROWS];
34
35static matrix_row_t scan_col(void) {
36 return (
37 (PINC&(1<<2) ? 0 : ((matrix_row_t)1<<0)) | \
38 (PINB&(1<<3) ? 0 : ((matrix_row_t)1<<1)) | \
39 (PINB&(1<<4) ? 0 : ((matrix_row_t)1<<2)) | \
40 (PINB&(1<<2) ? 0 : ((matrix_row_t)1<<3)) | \
41 (PINB&(1<<1) ? 0 : ((matrix_row_t)1<<4)) | \
42 (PINC&(1<<7) ? 0 : ((matrix_row_t)1<<5)) | \
43 (PINB&(1<<6) ? 0 : ((matrix_row_t)1<<6)) | \
44 (PINB&(1<<5) ? 0 : ((matrix_row_t)1<<7))
45 );
46}
47
48static void select_col(uint8_t col) {
49 switch (col) {
50 case 0: PORTD = (PORTD & ~0b01110111) | 0b01110110; break; \
51 case 1: PORTD = (PORTD & ~0b01110111) | 0b01100001; break; \
52 case 2: PORTD = (PORTD & ~0b01110111) | 0b01100101; break; \
53 case 3: PORTD = (PORTD & ~0b01110111) | 0b00000011; break; \
54 case 4: PORTD = (PORTD & ~0b01110111) | 0b00000111; break; \
55 case 5: PORTD = (PORTD & ~0b01110111) | 0b00010011; break; \
56 case 6: PORTD = (PORTD & ~0b01110111) | 0b00010111; break; \
57 case 7: PORTD = (PORTD & ~0b01110111) | 0b00100011; break; \
58 case 8: PORTD = (PORTD & ~0b01110111) | 0b00100111; break; \
59 case 9: PORTD = (PORTD & ~0b01110111) | 0b00110011; break; \
60 case 10: PORTD = (PORTD & ~0b01110111) | 0b01110010; break; \
61 case 11: PORTD = (PORTD & ~0b01110111) | 0b01100110; break; \
62 case 12: PORTD = (PORTD & ~0b01110111) | 0b01110000; break; \
63 case 13: PORTD = (PORTD & ~0b01110111) | 0b01100100; break; \
64 case 14: PORTD = (PORTD & ~0b01110111) | 0b01100000; break; \
65 case 15: PORTD = (PORTD & ~0b01110111) | 0b01000111; break; \
66 case 16: PORTD = (PORTD & ~0b01110111) | 0b01000011; break; \
67 case 17: PORTD = (PORTD & ~0b01110111) | 0b00110111; break;
68 }
69}
70
71void matrix_init(void) {
72 /* Column output pins */ \
73 DDRD |= 0b01110111; \
74 /* Row input pins */ \
75 DDRC &= ~0b10000100; \
76 DDRB &= ~0b01111110; \
77 PORTC |= 0b10000100; \
78 PORTB |= 0b01111110;
79
80 for (uint8_t i=0; i < MATRIX_ROWS; i++)
81 matrix[i] = matrix_debouncing[i] = 0;
82
83 matrix_init_quantum();
84}
85
86uint8_t matrix_scan(void) {
87 for (uint8_t col = 0; col < MATRIX_COLS; col++) {
88 select_col(col);
89 _delay_us(3);
90 matrix_row_t col_scan = scan_col();
91 for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
92 bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1<<col);
93 bool curr_bit = col_scan & (1<<row);
94 if (prev_bit != curr_bit) {
95 matrix_debouncing[row] ^= ((matrix_row_t)1<<col);
96 debouncing = DEBOUNCING_DELAY;
97 }
98 }
99 }
100
101 if (debouncing) {
102 if (--debouncing)
103 _delay_ms(1);
104 else
105 for (uint8_t i = 0; i < MATRIX_ROWS; i++)
106 matrix[i] = matrix_debouncing[i];
107 }
108
109 matrix_scan_quantum();
110 return 1;
111}
112
113inline matrix_row_t matrix_get_row(uint8_t row) {
114 return matrix[row];
115}
116
117void matrix_print(void) {
118 #ifndef NO_PRINT
119 print("\nr\\c ABCDEFGHIJKLMNOPQR\n");
120 for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
121 matrix_row_t matrix_row = matrix_get_row(row);
122 xprintf("%02X: ", row);
123 for (uint8_t col = 0; col < MATRIX_COLS; col++) {
124 bool curr_bit = matrix_row & (1<<col);
125 xprintf("%c", curr_bit ? '*' : '.');
126 }
127 print("\n");
128 }
129 #endif
130}
131
132uint8_t matrix_key_count(void) {
133 uint8_t count = 0;
134 for (uint8_t row = 0; row < MATRIX_ROWS; row++)
135 count += bitpop32(matrix[row]);
136 return count;
137} \ No newline at end of file
diff --git a/keyboards/tiger_lily/readme.md b/keyboards/tiger_lily/readme.md
new file mode 100644
index 000000000..b5f30f2e1
--- /dev/null
+++ b/keyboards/tiger_lily/readme.md
@@ -0,0 +1,32 @@
1tiger_lily keyboard firmware
2======================
3
4This is the firmware for Rev. 20161114 of the Tiger Lily controller by [Bathroom Epiphanies](http://bathroomepiphanies.com/controllers/), a replacement controller for the [Filco Majestouch 2 104 key](https://mechanicalkeyboards.com/shop/index.php?l=product_detail&p=1819). Bathroom Epiphanies has advised that the source is also compatible with the Black Petal controller, however I do not own an example to test against.
5
6The code was adapted from the [BathroomEpiphanies TMK Firmware](https://github.com/BathroomEpiphanies/epiphanies_tmk_keyboard/tree/master/be_controllers).
7
8## Quantum MK Firmware
9
10For the full Quantum feature list, see [the parent readme](/).
11
12## Building
13
14Download or clone the whole firmware and navigate to the keyboards/tiger_lily folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file.
15
16Depending on which keymap you would like to use, you will have to compile slightly differently.
17
18### Default
19
20To build with the default keymap, simply run `make default`.
21
22### Other Keymaps
23
24Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files.
25
26To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
27
28```
29$ make [default|jack|<name>]
30```
31
32Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
diff --git a/keyboards/tiger_lily/rules.mk b/keyboards/tiger_lily/rules.mk
new file mode 100644
index 000000000..dd2f4b6ee
--- /dev/null
+++ b/keyboards/tiger_lily/rules.mk
@@ -0,0 +1,71 @@
1# MCU name
2#MCU = at90usb1287
3MCU = atmega32u2
4
5# Processor frequency.
6# This will define a symbol, F_CPU, in all source code files equal to the
7# processor frequency in Hz. You can then use this symbol in your source code to
8# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
9# automatically to create a 32-bit value in your source code.
10#
11# This will be an integer division of F_USB below, as it is sourced by
12# F_USB after it has run through any CPU prescalers. Note that this value
13# does not *change* the processor frequency - it should merely be updated to
14# reflect the processor speed set externally so that the code can use accurate
15# software delays.
16F_CPU = 16000000
17
18
19#
20# LUFA specific
21#
22# Target architecture (see library "Board Types" documentation).
23ARCH = AVR8
24
25# Input clock frequency.
26# This will define a symbol, F_USB, in all source code files equal to the
27# input clock frequency (before any prescaling is performed) in Hz. This value may
28# differ from F_CPU if prescaling is used on the latter, and is required as the
29# raw input clock is fed directly to the PLL sections of the AVR for high speed
30# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
31# at the end, this will be done automatically to create a 32-bit value in your
32# source code.
33#
34# If no clock division is performed on the input clock inside the AVR (via the
35# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
36F_USB = $(F_CPU)
37
38# Interrupt driven control endpoint task(+60)
39OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
40
41
42# Boot Section Size in *bytes*
43# Teensy halfKay 512
44# Teensy++ halfKay 1024
45# Atmel DFU loader 4096
46# LUFA bootloader 4096
47# USBaspLoader 2048
48OPT_DEFS += -DBOOTLOADER_SIZE=4096
49
50
51# Build Options
52# change yes to no to disable
53#
54BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
55MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
56EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
57CONSOLE_ENABLE ?= yes # Console for debug(+400)
58COMMAND_ENABLE ?= yes # Commands for debug and configuration
59# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
60SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
61# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
62NKRO_ENABLE ?= no # USB Nkey Rollover
63BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
64MIDI_ENABLE ?= no # MIDI controls
65UNICODE_ENABLE ?= no # Unicode
66BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
67AUDIO_ENABLE ?= no # Audio output on port C6
68FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches
69
70CUSTOM_MATRIX = yes
71SRC += matrix.c \ No newline at end of file
diff --git a/keyboards/tiger_lily/tiger_lily.c b/keyboards/tiger_lily/tiger_lily.c
new file mode 100644
index 000000000..d2e7ba709
--- /dev/null
+++ b/keyboards/tiger_lily/tiger_lily.c
@@ -0,0 +1,63 @@
1#include "tiger_lily.h"
2
3void matrix_init_kb(void) {
4 // put your keyboard start-up code here
5 // runs once when the firmware starts up
6
7 matrix_init_user();
8}
9
10void matrix_scan_kb(void) {
11 // put your looping keyboard code here
12 // runs every cycle (a lot)
13
14 matrix_scan_user();
15}
16
17bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
18 // put your per-action keyboard code here
19 // runs for every action, just before processing by the firmware
20
21 return process_record_user(keycode, record);
22}
23
24void led_set_kb(uint8_t usb_led) {
25 DDRB |= (1<<7);
26 DDRC |= (1<<5) | (1<<6);
27
28 print_dec(usb_led);
29
30 if (usb_led & (1<<USB_LED_NUM_LOCK))
31 PORTC &= ~(1<<5);
32 else
33 PORTC |= (1<<5);
34
35 if (usb_led & (1<<USB_LED_SCROLL_LOCK))
36 PORTB &= ~(1<<7);
37 else
38 PORTB |= (1<<7);
39
40 if (usb_led & (1<<USB_LED_CAPS_LOCK))
41 PORTC &= ~(1<<6);
42 else
43 PORTC |= (1<<6);
44
45 led_set_user(usb_led);
46}
47
48__attribute__ ((weak))
49void matrix_init_user(void) {
50}
51
52__attribute__ ((weak))
53void matrix_scan_user(void) {
54}
55
56__attribute__ ((weak))
57bool process_record_user(uint16_t keycode, keyrecord_t *record) {
58 return true;
59}
60
61__attribute__ ((weak))
62void led_set_user(uint8_t usb_led) {
63} \ No newline at end of file
diff --git a/keyboards/tiger_lily/tiger_lily.h b/keyboards/tiger_lily/tiger_lily.h
new file mode 100644
index 000000000..a1b226558
--- /dev/null
+++ b/keyboards/tiger_lily/tiger_lily.h
@@ -0,0 +1,50 @@
1#ifndef TIGER_LILY_H
2#define TIGER_LILY_H
3
4#include "quantum.h"
5
6// This a shortcut to help you visually see your layout.
7// The following is an example using the Planck MIT layout
8// The first section contains all of the arguements
9// The second converts the arguments into a two-dimensional array
10
11/*
12 Matrix col/row mapping
13
14 ,----. ,-------------------. ,-------------------. ,-------------------. ,--------------.
15 | J6 | | I4 | H4 | H2 | H6 | | A7 | E6 | D2 | D4 | | B4 | B7 | B6 | B0 | | C7 | C5 | A5 |
16 `----' `-------------------' `-------------------' `-------------------' `--------------'
17 ,-------------------------------------------------------------------------. ,--------------. ,-------------------.
18 | J4 | J7 | I7 | H7 | G7 | G4 | F4 | F7 | E7 | D7 | R7 | R4 | E4 | B2 | | L4 | O4 | Q4 | | K1 | L1 | Q1 | Q0 |
19 |-------------------------------------------------------------------------| |--------------| |-------------------|
20 | J2 | J5 | I5 | H5 | G5 | G2 | F2 | F5 | E5 | D5 | R5 | R2 | E2 | B3 | | K4 | O7 | Q7 | | K5 | L5 | Q5 | O5 |
21 |-------------------------------------------------------------------------| '--------------' |-------------- |
22 | O5 | J3 | I3 | H3 | G3 | G6 | F6 | F3 | E3 | D3 | R3 | R6 | B1 | | K2 | L2 | Q2 | |
23 |-------------------------------------------------------------------------| ,----. |-------------------|
24 | N2 | J1 | I1 | H1 | G1 | G0 | F0 | F1 | E1 | D1 | R0 | N3 | | O6 | | K3 | L3 | Q3 | O3 |
25 |-------------------------------------------------------------------------| ,--------------. |-------------- |
26 | A4 | P2 | C6 | K6 | C0 | M3 | D0 | A1 | | O0 | K0 | L0 | | L6 | Q6 | |
27 `-------------------------------------------------------------------------' `--------------' `-------------------'
28*/
29#define KEYMAP( \
30 KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \
31 KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, KK1, KL1, KQ1, KQ0, \
32 KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, KK5, KL5, KQ5, KO5, \
33 KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, KK2, KL2, KQ2, \
34 KN2, KI6, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, KK3, KL3, KQ3, KO3, \
35 KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0, KL6, KQ6 \
36) \
37{ \
38/* Columns and rows need to be swapped in the below definition */ \
39/* A B C D E F G H I J K L M N O P Q R */ \
40/* 0 */ { KC_NO, KB0, KC0, KD0, KC_NO, KF0, KG0, KC_NO, KC_NO, KC_NO, KK0, KL0, KC_NO, KC_NO, KO0, KC_NO, KQ0, KR0 }, \
41/* 1 */ { KA1, KB1, KC_NO, KD1, KE1, KF1, KG1, KH1, KI1, KJ1, KK1, KL1, KC_NO, KC_NO, KC_NO, KC_NO, KQ1, KC_NO }, \
42/* 2 */ { KC_NO, KB2, KC_NO, KD2, KE2, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, KC_NO, KN2, KC_NO, KP2, KQ2, KR2 }, \
43/* 3 */ { KC_NO, KB3, KC_NO, KD3, KE3, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3, KC_NO, KQ3, KR3 }, \
44/* 4 */ { KA4, KB4, KC_NO, KD4, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, KC_NO, KC_NO, KO4, KC_NO, KQ4, KR4 }, \
45/* 5 */ { KA5, KC_NO, KC5, KD5, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, KC_NO, KC_NO, KO5, KC_NO, KQ5, KR5 }, \
46/* 6 */ { KC_NO, KB6, KC6, KC_NO, KE6, KF6, KG6, KH6, KI6, KJ6, KK6, KL6, KC_NO, KC_NO, KO6, KC_NO, KQ6, KR6 }, \
47/* 7 */ { KA7, KB7, KC7, KD7, KE7, KF7, KG7, KH7, KI7, KJ7, KC_NO, KC_NO, KC_NO, KC_NO, KO7, KC_NO, KQ7, KR7 } \
48}
49
50#endif