diff options
| -rwxr-xr-x | keyboards/novelpad/config.h | 218 | ||||
| -rw-r--r-- | keyboards/novelpad/info.json | 27 | ||||
| -rwxr-xr-x | keyboards/novelpad/keymaps/default/keymap.c | 139 | ||||
| -rwxr-xr-x | keyboards/novelpad/novelpad.c | 1 | ||||
| -rwxr-xr-x | keyboards/novelpad/novelpad.h | 26 | ||||
| -rw-r--r-- | keyboards/novelpad/readme.md (renamed from keyboards/novelpad/README.md) | 2 | ||||
| -rwxr-xr-x | keyboards/novelpad/rules.mk | 45 |
7 files changed, 293 insertions, 165 deletions
diff --git a/keyboards/novelpad/config.h b/keyboards/novelpad/config.h index c9b6b91a5..a2d24d7f8 100755 --- a/keyboards/novelpad/config.h +++ b/keyboards/novelpad/config.h | |||
| @@ -14,8 +14,8 @@ GNU General Public License for more details. | |||
| 14 | You should have received a copy of the GNU General Public License | 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/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | */ | 16 | */ |
| 17 | #ifndef CONFIG_H | 17 | |
| 18 | #define CONFIG_H | 18 | #pragma once |
| 19 | 19 | ||
| 20 | #include "config_common.h" | 20 | #include "config_common.h" |
| 21 | 21 | ||
| @@ -31,35 +31,219 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 31 | #define MATRIX_ROWS 5 | 31 | #define MATRIX_ROWS 5 |
| 32 | #define MATRIX_COLS 4 | 32 | #define MATRIX_COLS 4 |
| 33 | 33 | ||
| 34 | /* key matrix pins */ | 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 | * | ||
| 43 | */ | ||
| 35 | #define MATRIX_ROW_PINS { C2, C4, C5, C6, C7 } | 44 | #define MATRIX_ROW_PINS { C2, C4, C5, C6, C7 } |
| 36 | #define MATRIX_COL_PINS { D7, D6, D5, D4 } | 45 | #define MATRIX_COL_PINS { D7, D6, D5, D4 } |
| 37 | #define UNUSED_PINS | 46 | #define UNUSED_PINS |
| 38 | 47 | ||
| 39 | /* COL2ROW or ROW2COL */ | 48 | /* COL2ROW, ROW2COL*/ |
| 40 | #define DIODE_DIRECTION COL2ROW | 49 | #define DIODE_DIRECTION COL2ROW |
| 41 | 50 | ||
| 42 | /* Set 0 if debouncing isn't needed */ | 51 | #define BACKLIGHT_PIN B7 |
| 52 | //#define BACKLIGHT_BREATHING | ||
| 53 | #define BACKLIGHT_LEVELS 10 | ||
| 54 | |||
| 55 | /* | ||
| 56 | * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. | ||
| 57 | */ | ||
| 58 | #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 | ||
| 59 | |||
| 60 | #define RGB_DI_PIN D3 | ||
| 61 | #ifdef RGB_DI_PIN | ||
| 62 | #define RGBLED_NUM 4 | ||
| 63 | // #define RGBLIGHT_HUE_STEP 8 | ||
| 64 | // #define RGBLIGHT_SAT_STEP 8 | ||
| 65 | // #define RGBLIGHT_VAL_STEP 8 | ||
| 66 | // #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ | ||
| 67 | // #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ | ||
| 68 | // /*== all animations enable ==*/ | ||
| 69 | #define RGBLIGHT_ANIMATIONS | ||
| 70 | // /*== or choose animations ==*/ | ||
| 71 | // #define RGBLIGHT_EFFECT_BREATHING | ||
| 72 | // #define RGBLIGHT_EFFECT_RAINBOW_MOOD | ||
| 73 | // #define RGBLIGHT_EFFECT_RAINBOW_SWIRL | ||
| 74 | // #define RGBLIGHT_EFFECT_SNAKE | ||
| 75 | // #define RGBLIGHT_EFFECT_KNIGHT | ||
| 76 | // #define RGBLIGHT_EFFECT_CHRISTMAS | ||
| 77 | // #define RGBLIGHT_EFFECT_STATIC_GRADIENT | ||
| 78 | // #define RGBLIGHT_EFFECT_RGB_TEST | ||
| 79 | // #define RGBLIGHT_EFFECT_ALTERNATING | ||
| 80 | // /*== customize breathing effect ==*/ | ||
| 81 | // /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ | ||
| 82 | // #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 | ||
| 83 | // /*==== use exp() and sin() ====*/ | ||
| 84 | // #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 | ||
| 85 | // #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 | ||
| 86 | #endif | ||
| 87 | |||
| 88 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 43 | #define DEBOUNCE 5 | 89 | #define DEBOUNCE 5 |
| 44 | 90 | ||
| 91 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ | ||
| 92 | //#define MATRIX_HAS_GHOST | ||
| 93 | |||
| 45 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | 94 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ |
| 46 | #define LOCKING_SUPPORT_ENABLE | 95 | #define LOCKING_SUPPORT_ENABLE |
| 47 | |||
| 48 | /* Locking resynchronize hack */ | 96 | /* Locking resynchronize hack */ |
| 49 | #define LOCKING_RESYNC_ENABLE | 97 | #define LOCKING_RESYNC_ENABLE |
| 50 | 98 | ||
| 51 | /* key combination for command */ | 99 | /* If defined, GRAVE_ESC will always act as ESC when CTRL is held. |
| 52 | #define IS_COMMAND() ( \ | 100 | * This is userful for the Windows task manager shortcut (ctrl+shift+esc). |
| 53 | false \ | 101 | */ |
| 54 | ) | 102 | // #define GRAVE_ESC_CTRL_OVERRIDE |
| 55 | 103 | ||
| 56 | #define BACKLIGHT_LEVELS 10 | 104 | /* |
| 57 | #define BACKLIGHT_PIN B7 | 105 | * Force NKRO |
| 106 | * | ||
| 107 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | ||
| 108 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | ||
| 109 | * makefile for this to work.) | ||
| 110 | * | ||
| 111 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | ||
| 112 | * until the next keyboard reset. | ||
| 113 | * | ||
| 114 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | ||
| 115 | * fully operational during normal computer usage. | ||
| 116 | * | ||
| 117 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | ||
| 118 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | ||
| 119 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a | ||
| 120 | * power-up. | ||
| 121 | * | ||
| 122 | */ | ||
| 123 | //#define FORCE_NKRO | ||
| 58 | 124 | ||
| 59 | #ifdef RGBLIGHT_ENABLE | 125 | /* |
| 60 | #define RGB_DI_PIN D3 | 126 | * Magic Key Options |
| 61 | #define RGBLIGHT_ANIMATIONS | 127 | * |
| 62 | #define RGBLED_NUM 4 | 128 | * Magic keys are hotkey commands that allow control over firmware functions of |
| 63 | #endif | 129 | * the keyboard. They are best used in combination with the HID Listen program, |
| 130 | * found here: https://www.pjrc.com/teensy/hid_listen.html | ||
| 131 | * | ||
| 132 | * The options below allow the magic key functionality to be changed. This is | ||
| 133 | * useful if your keyboard/keypad is missing keys and you want magic key support. | ||
| 134 | * | ||
| 135 | */ | ||
| 136 | |||
| 137 | /* key combination for magic key command */ | ||
| 138 | /* defined by default; to change, uncomment and set to the combination you want */ | ||
| 139 | // #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) | ||
| 140 | |||
| 141 | /* control how magic key switches layers */ | ||
| 142 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true | ||
| 143 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true | ||
| 144 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false | ||
| 64 | 145 | ||
| 146 | /* override magic key keymap */ | ||
| 147 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS | ||
| 148 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS | ||
| 149 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM | ||
| 150 | //#define MAGIC_KEY_HELP H | ||
| 151 | //#define MAGIC_KEY_HELP_ALT SLASH | ||
| 152 | //#define MAGIC_KEY_DEBUG D | ||
| 153 | //#define MAGIC_KEY_DEBUG_MATRIX X | ||
| 154 | //#define MAGIC_KEY_DEBUG_KBD K | ||
| 155 | //#define MAGIC_KEY_DEBUG_MOUSE M | ||
| 156 | //#define MAGIC_KEY_VERSION V | ||
| 157 | //#define MAGIC_KEY_STATUS S | ||
| 158 | //#define MAGIC_KEY_CONSOLE C | ||
| 159 | //#define MAGIC_KEY_LAYER0 0 | ||
| 160 | //#define MAGIC_KEY_LAYER0_ALT GRAVE | ||
| 161 | //#define MAGIC_KEY_LAYER1 1 | ||
| 162 | //#define MAGIC_KEY_LAYER2 2 | ||
| 163 | //#define MAGIC_KEY_LAYER3 3 | ||
| 164 | //#define MAGIC_KEY_LAYER4 4 | ||
| 165 | //#define MAGIC_KEY_LAYER5 5 | ||
| 166 | //#define MAGIC_KEY_LAYER6 6 | ||
| 167 | //#define MAGIC_KEY_LAYER7 7 | ||
| 168 | //#define MAGIC_KEY_LAYER8 8 | ||
| 169 | //#define MAGIC_KEY_LAYER9 9 | ||
| 170 | //#define MAGIC_KEY_BOOTLOADER B | ||
| 171 | //#define MAGIC_KEY_BOOTLOADER_ALT ESC | ||
| 172 | //#define MAGIC_KEY_LOCK CAPS | ||
| 173 | //#define MAGIC_KEY_EEPROM E | ||
| 174 | //#define MAGIC_KEY_EEPROM_CLEAR BSPACE | ||
| 175 | //#define MAGIC_KEY_NKRO N | ||
| 176 | //#define MAGIC_KEY_SLEEP_LED Z | ||
| 177 | |||
| 178 | /* | ||
| 179 | * Feature disable options | ||
| 180 | * These options are also useful to firmware size reduction. | ||
| 181 | */ | ||
| 182 | |||
| 183 | /* disable debug print */ | ||
| 184 | //#define NO_DEBUG | ||
| 185 | |||
| 186 | /* disable print */ | ||
| 187 | //#define NO_PRINT | ||
| 188 | |||
| 189 | /* disable action features */ | ||
| 190 | //#define NO_ACTION_LAYER | ||
| 191 | //#define NO_ACTION_TAPPING | ||
| 192 | //#define NO_ACTION_ONESHOT | ||
| 193 | //#define NO_ACTION_MACRO | ||
| 194 | //#define NO_ACTION_FUNCTION | ||
| 195 | |||
| 196 | /* | ||
| 197 | * MIDI options | ||
| 198 | */ | ||
| 199 | |||
| 200 | /* Prevent use of disabled MIDI features in the keymap */ | ||
| 201 | //#define MIDI_ENABLE_STRICT 1 | ||
| 202 | |||
| 203 | /* enable basic MIDI features: | ||
| 204 | - MIDI notes can be sent when in Music mode is on | ||
| 205 | */ | ||
| 206 | //#define MIDI_BASIC | ||
| 207 | |||
| 208 | /* enable advanced MIDI features: | ||
| 209 | - MIDI notes can be added to the keymap | ||
| 210 | - Octave shift and transpose | ||
| 211 | - Virtual sustain, portamento, and modulation wheel | ||
| 212 | - etc. | ||
| 213 | */ | ||
| 214 | //#define MIDI_ADVANCED | ||
| 215 | |||
| 216 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | ||
| 217 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 | ||
| 218 | |||
| 219 | /* | ||
| 220 | * HD44780 LCD Display Configuration | ||
| 221 | */ | ||
| 222 | /* | ||
| 223 | #define LCD_LINES 2 //< number of visible lines of the display | ||
| 224 | #define LCD_DISP_LENGTH 16 //< visibles characters per line of the display | ||
| 225 | |||
| 226 | #define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode | ||
| 227 | |||
| 228 | #if LCD_IO_MODE | ||
| 229 | #define LCD_PORT PORTB //< port for the LCD lines | ||
| 230 | #define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 | ||
| 231 | #define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 | ||
| 232 | #define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 | ||
| 233 | #define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 | ||
| 234 | #define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 | ||
| 235 | #define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 | ||
| 236 | #define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 | ||
| 237 | #define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 | ||
| 238 | #define LCD_RS_PORT LCD_PORT //< port for RS line | ||
| 239 | #define LCD_RS_PIN 3 //< pin for RS line | ||
| 240 | #define LCD_RW_PORT LCD_PORT //< port for RW line | ||
| 241 | #define LCD_RW_PIN 2 //< pin for RW line | ||
| 242 | #define LCD_E_PORT LCD_PORT //< port for Enable line | ||
| 243 | #define LCD_E_PIN 1 //< pin for Enable line | ||
| 65 | #endif | 244 | #endif |
| 245 | */ | ||
| 246 | |||
| 247 | /* Bootmagic Lite key configuration */ | ||
| 248 | // #define BOOTMAGIC_LITE_ROW 0 | ||
| 249 | // #define BOOTMAGIC_LITE_COLUMN 0 | ||
diff --git a/keyboards/novelpad/info.json b/keyboards/novelpad/info.json index 7523bf5dd..4bd648754 100644 --- a/keyboards/novelpad/info.json +++ b/keyboards/novelpad/info.json | |||
| @@ -6,7 +6,32 @@ | |||
| 6 | "height": 5, | 6 | "height": 5, |
| 7 | "layouts": { | 7 | "layouts": { |
| 8 | "LAYOUT_ortho_5x4": { | 8 | "LAYOUT_ortho_5x4": { |
| 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}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}] | 9 | "layout": [ |
| 10 | {"x":0, "y":0}, | ||
| 11 | {"x":1, "y":0}, | ||
| 12 | {"x":2, "y":0}, | ||
| 13 | {"x":3, "y":0}, | ||
| 14 | |||
| 15 | {"x":0, "y":1}, | ||
| 16 | {"x":1, "y":1}, | ||
| 17 | {"x":2, "y":1}, | ||
| 18 | {"x":3, "y":1}, | ||
| 19 | |||
| 20 | {"x":0, "y":2}, | ||
| 21 | {"x":1, "y":2}, | ||
| 22 | {"x":2, "y":2}, | ||
| 23 | {"x":3, "y":2}, | ||
| 24 | |||
| 25 | {"x":0, "y":3}, | ||
| 26 | {"x":1, "y":3}, | ||
| 27 | {"x":2, "y":3}, | ||
| 28 | {"x":3, "y":3}, | ||
| 29 | |||
| 30 | {"x":0, "y":4}, | ||
| 31 | {"x":1, "y":4}, | ||
| 32 | {"x":2, "y":4}, | ||
| 33 | {"x":3, "y":4} | ||
| 34 | ] | ||
| 10 | } | 35 | } |
| 11 | } | 36 | } |
| 12 | } | 37 | } |
diff --git a/keyboards/novelpad/keymaps/default/keymap.c b/keyboards/novelpad/keymaps/default/keymap.c index 76e0937e6..cbac67eaa 100755 --- a/keyboards/novelpad/keymaps/default/keymap.c +++ b/keyboards/novelpad/keymaps/default/keymap.c | |||
| @@ -14,111 +14,60 @@ GNU General Public License for more details. | |||
| 14 | You should have received a copy of the GNU General Public License | 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/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | */ | 16 | */ |
| 17 | |||
| 17 | #include QMK_KEYBOARD_H | 18 | #include QMK_KEYBOARD_H |
| 18 | 19 | ||
| 19 | enum custom_keycodes { | 20 | enum custom_keycodes { |
| 20 | BL = SAFE_RANGE, | 21 | WK_RED = SAFE_RANGE, |
| 21 | WK_RED, | 22 | WK_GREEN, |
| 22 | WK_GREEN, | 23 | WK_BLUE |
| 23 | WK_BLUE | ||
| 24 | }; | 24 | }; |
| 25 | 25 | ||
| 26 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 26 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| 27 | 27 | [0] = LAYOUT( | |
| 28 | [0] = LAYOUT( | 28 | KC_NLCK, KC_PSLS, KC_PAST, KC_ESC, |
| 29 | KC_NLCK, KC_PSLS, KC_PAST, KC_ESC, | 29 | KC_P7, KC_P8, KC_P9, KC_PMNS, |
| 30 | KC_P7, KC_P8, KC_P9, KC_PMNS, | 30 | KC_P4, KC_P5, KC_P6, KC_PPLS, |
| 31 | KC_P4, KC_P5, KC_P6, KC_PPLS, | 31 | KC_P1, KC_P2, KC_P3, KC_TAB, |
| 32 | KC_P1, KC_P2, KC_P3, KC_TAB, | 32 | MO(1), KC_P0, KC_PDOT, KC_ENT |
| 33 | MO(1), KC_P0, KC_PDOT, KC_ENT | 33 | ), |
| 34 | ), | 34 | |
| 35 | 35 | [1] = LAYOUT( | |
| 36 | [1] = LAYOUT( | 36 | _______, BL_STEP, RGB_M_SW, RESET, |
| 37 | _______, BL, RGB_MODE_SWIRL, RESET, | 37 | RGB_TOG, RGB_MOD, RGB_M_P, RGB_M_SN, |
| 38 | RGB_TOG, RGB_MOD, RGB_MODE_PLAIN, RGB_MODE_SNAKE, | 38 | RGB_HUI, RGB_SAI, RGB_VAI, RGB_M_K, |
| 39 | RGB_HUI, RGB_SAI, RGB_VAI, RGB_MODE_KNIGHT, | 39 | RGB_HUD, RGB_SAD, RGB_VAD, RGB_M_X, |
| 40 | RGB_HUD, RGB_SAD, RGB_VAD, RGB_MODE_XMAS, | 40 | _______, WK_RED, WK_GREEN, WK_BLUE |
| 41 | _______, WK_RED, WK_GREEN, WK_BLUE | 41 | ) |
| 42 | ), | ||
| 43 | |||
| 44 | }; | 42 | }; |
| 45 | 43 | ||
| 46 | void matrix_init_user(void) { | 44 | void keyboard_post_init_user(void) { |
| 47 | 45 | rgblight_setrgb(0, 255, 0); | |
| 48 | rgblight_setrgb(0,255,0); | ||
| 49 | } | ||
| 50 | |||
| 51 | void matrix_scan_user(void) { | ||
| 52 | } | 46 | } |
| 53 | 47 | ||
| 54 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 48 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
| 55 | switch (keycode) { | 49 | switch (keycode) { |
| 56 | case BL: | 50 | case WK_RED: |
| 57 | if (record->event.pressed) { | 51 | if (record->event.pressed) { |
| 58 | #ifdef BACKLIGHT_ENABLE | 52 | rgblight_show_solid_color(0xFF, 0x00, 0x00); |
| 59 | backlight_step(); | 53 | } else { |
| 60 | #endif | 54 | rgblight_show_solid_color(0xFF, 0xFF, 0xFF); |
| 55 | } | ||
| 56 | return false; | ||
| 57 | case WK_GREEN: | ||
| 58 | if (record->event.pressed) { | ||
| 59 | rgblight_show_solid_color(0x00, 0xFF, 0x00); | ||
| 60 | } else { | ||
| 61 | rgblight_show_solid_color(0xFF, 0xFF, 0xFF); | ||
| 62 | } | ||
| 63 | return false; | ||
| 64 | case WK_BLUE: | ||
| 65 | if (record->event.pressed) { | ||
| 66 | rgblight_show_solid_color(0x00, 0x00, 0xFF); | ||
| 67 | } else { | ||
| 68 | rgblight_show_solid_color(0xFF, 0xFF, 0xFF); | ||
| 69 | } | ||
| 70 | return false; | ||
| 61 | } | 71 | } |
| 62 | return false; | 72 | return true; |
| 63 | break; | ||
| 64 | case WK_RED: | ||
| 65 | if (record->event.pressed) { | ||
| 66 | rgblight_show_solid_color(0xFF, 0, 0); | ||
| 67 | } else { | ||
| 68 | rgblight_show_solid_color(0xFF, 0xFF, 0xFF); | ||
| 69 | } | ||
| 70 | return false; | ||
| 71 | break; | ||
| 72 | case WK_GREEN: | ||
| 73 | if (record->event.pressed) { | ||
| 74 | rgblight_show_solid_color(0, 0xFF, 0); | ||
| 75 | } else { | ||
| 76 | rgblight_show_solid_color(0xFF, 0xFF, 0xFF); | ||
| 77 | } | ||
| 78 | return false; | ||
| 79 | break; | ||
| 80 | case WK_BLUE: | ||
| 81 | if (record->event.pressed) { | ||
| 82 | rgblight_show_solid_color(0, 0, 0xFF); | ||
| 83 | } else { | ||
| 84 | rgblight_show_solid_color(0xFF, 0xFF, 0xFF); | ||
| 85 | } | ||
| 86 | return false; | ||
| 87 | break; | ||
| 88 | } | ||
| 89 | return true; | ||
| 90 | } | ||
| 91 | |||
| 92 | void led_set_user(uint8_t usb_led) { | ||
| 93 | |||
| 94 | if (usb_led & (1 << USB_LED_NUM_LOCK)) { | ||
| 95 | |||
| 96 | } else { | ||
| 97 | |||
| 98 | } | ||
| 99 | |||
| 100 | if (usb_led & (1 << USB_LED_CAPS_LOCK)) { | ||
| 101 | |||
| 102 | } else { | ||
| 103 | |||
| 104 | } | ||
| 105 | |||
| 106 | if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { | ||
| 107 | |||
| 108 | } else { | ||
| 109 | |||
| 110 | } | ||
| 111 | |||
| 112 | if (usb_led & (1 << USB_LED_COMPOSE)) { | ||
| 113 | |||
| 114 | } else { | ||
| 115 | |||
| 116 | } | ||
| 117 | |||
| 118 | if (usb_led & (1 << USB_LED_KANA)) { | ||
| 119 | |||
| 120 | } else { | ||
| 121 | |||
| 122 | } | ||
| 123 | |||
| 124 | } | 73 | } |
diff --git a/keyboards/novelpad/novelpad.c b/keyboards/novelpad/novelpad.c index 719cb89d6..9f6ee7dae 100755 --- a/keyboards/novelpad/novelpad.c +++ b/keyboards/novelpad/novelpad.c | |||
| @@ -14,4 +14,5 @@ GNU General Public License for more details. | |||
| 14 | You should have received a copy of the GNU General Public License | 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/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | */ | 16 | */ |
| 17 | |||
| 17 | #include "novelpad.h" | 18 | #include "novelpad.h" |
diff --git a/keyboards/novelpad/novelpad.h b/keyboards/novelpad/novelpad.h index f5a0b95f5..6650a6722 100755 --- a/keyboards/novelpad/novelpad.h +++ b/keyboards/novelpad/novelpad.h | |||
| @@ -14,25 +14,23 @@ GNU General Public License for more details. | |||
| 14 | You should have received a copy of the GNU General Public License | 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/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | */ | 16 | */ |
| 17 | #ifndef KB_H | 17 | |
| 18 | #define KB_H | 18 | #pragma once |
| 19 | 19 | ||
| 20 | #include "quantum.h" | 20 | #include "quantum.h" |
| 21 | 21 | ||
| 22 | #define LAYOUT_ortho_5x4( \ | 22 | #define LAYOUT_ortho_5x4( \ |
| 23 | K00, K01, K02, K03, \ | 23 | K00, K01, K02, K03, \ |
| 24 | K10, K11, K12, K13, \ | 24 | K10, K11, K12, K13, \ |
| 25 | K20, K21, K22, K23, \ | 25 | K20, K21, K22, K23, \ |
| 26 | K30, K31, K32, K33, \ | 26 | K30, K31, K32, K33, \ |
| 27 | K40, K41, K42, K43 \ | 27 | K40, K41, K42, K43 \ |
| 28 | ) { \ | 28 | ) { \ |
| 29 | { K00, K01, K02, K03 }, \ | 29 | { K00, K01, K02, K03 }, \ |
| 30 | { K10, K11, K12, K13 }, \ | 30 | { K10, K11, K12, K13 }, \ |
| 31 | { K20, K21, K22, K23 }, \ | 31 | { K20, K21, K22, K23 }, \ |
| 32 | { K30, K31, K32, K33 }, \ | 32 | { K30, K31, K32, K33 }, \ |
| 33 | { K40, K41, K42, K43 } \ | 33 | { K40, K41, K42, K43 } \ |
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | #define LAYOUT LAYOUT_ortho_5x4 | 36 | #define LAYOUT LAYOUT_ortho_5x4 |
| 37 | |||
| 38 | #endif | ||
diff --git a/keyboards/novelpad/README.md b/keyboards/novelpad/readme.md index 5c73644a2..0cde8337c 100644 --- a/keyboards/novelpad/README.md +++ b/keyboards/novelpad/readme.md | |||
| @@ -12,4 +12,4 @@ Make example for this keyboard (after setting up your build environment): | |||
| 12 | 12 | ||
| 13 | make novelpad:default | 13 | make novelpad:default |
| 14 | 14 | ||
| 15 | See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. | 15 | See 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/novelpad/rules.mk b/keyboards/novelpad/rules.mk index 8d35c6c05..e77a0d651 100755 --- a/keyboards/novelpad/rules.mk +++ b/keyboards/novelpad/rules.mk | |||
| @@ -1,44 +1,15 @@ | |||
| 1 | # MCU name | 1 | # MCU name |
| 2 | MCU = atmega32u2 | 2 | MCU = atmega32u2 |
| 3 | 3 | ||
| 4 | # Processor frequency. | ||
| 5 | # This will define a symbol, F_CPU, in all source code files equal to the | ||
| 6 | # processor frequency in Hz. You can then use this symbol in your source code to | ||
| 7 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
| 8 | # automatically to create a 32-bit value in your source code. | ||
| 9 | # | ||
| 10 | # This will be an integer division of F_USB below, as it is sourced by | ||
| 11 | # F_USB after it has run through any CPU prescalers. Note that this value | ||
| 12 | # does not *change* the processor frequency - it should merely be updated to | ||
| 13 | # reflect the processor speed set externally so that the code can use accurate | ||
| 14 | # software delays. | ||
| 15 | F_CPU = 16000000 | ||
| 16 | |||
| 17 | # | ||
| 18 | # LUFA specific | ||
| 19 | # | ||
| 20 | # Target architecture (see library "Board Types" documentation). | ||
| 21 | ARCH = AVR8 | ||
| 22 | |||
| 23 | # Input clock frequency. | ||
| 24 | # This will define a symbol, F_USB, in all source code files equal to the | ||
| 25 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
| 26 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
| 27 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
| 28 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
| 29 | # at the end, this will be done automatically to create a 32-bit value in your | ||
| 30 | # source code. | ||
| 31 | # | ||
| 32 | # If no clock division is performed on the input clock inside the AVR (via the | ||
| 33 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
| 34 | F_USB = $(F_CPU) | ||
| 35 | |||
| 36 | # Interrupt driven control endpoint task(+60) | ||
| 37 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
| 38 | |||
| 39 | 4 | ||
| 40 | # Boot Section Size in *bytes* | 5 | # Bootloader selection |
| 41 | OPT_DEFS += -DBOOTLOADER_SIZE=4096 | 6 | # Teensy halfkay |
| 7 | # Pro Micro caterina | ||
| 8 | # Atmel DFU atmel-dfu | ||
| 9 | # LUFA DFU lufa-dfu | ||
| 10 | # QMK DFU qmk-dfu | ||
| 11 | # atmega32a bootloadHID | ||
| 12 | BOOTLOADER = atmel-dfu | ||
| 42 | 13 | ||
| 43 | 14 | ||
| 44 | # Build Options | 15 | # Build Options |
