diff options
| author | Andrew Kannan <andrew.kannan@klaviyo.com> | 2020-04-15 18:37:47 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-15 15:37:47 -0700 |
| commit | 17d0f6338e093f0f000b6a5cd2382d88ccbf1b79 (patch) | |
| tree | 1ce9a6a36f5a7947c221bfae3ea185993ac09b96 /keyboards/projectkb | |
| parent | 484c059d867e93e9374902121c6ce64774d28d7d (diff) | |
| download | qmk_firmware-17d0f6338e093f0f000b6a5cd2382d88ccbf1b79.tar.gz qmk_firmware-17d0f6338e093f0f000b6a5cd2382d88ccbf1b79.zip | |
[Keyboard] ProjectKB Alice rev2 (#8718)
* Add revision 1 and revision 2 to ProjectKB Alice PCB
* Swap SLEEP LED to no
* Basic root rules.mk
* Apply suggestions from code review
* Update keyboards/projectkb/alice/rules.mk
Diffstat (limited to 'keyboards/projectkb')
| -rw-r--r-- | keyboards/projectkb/alice/alice.c | 12 | ||||
| -rw-r--r-- | keyboards/projectkb/alice/readme.md | 2 | ||||
| -rw-r--r-- | keyboards/projectkb/alice/rev1/config.h (renamed from keyboards/projectkb/alice/config.h) | 3 | ||||
| -rw-r--r-- | keyboards/projectkb/alice/rev1/rules.mk | 27 | ||||
| -rw-r--r-- | keyboards/projectkb/alice/rev2/config.h | 85 | ||||
| -rw-r--r-- | keyboards/projectkb/alice/rev2/rules.mk | 27 | ||||
| -rw-r--r-- | keyboards/projectkb/alice/rules.mk | 23 |
7 files changed, 150 insertions, 29 deletions
diff --git a/keyboards/projectkb/alice/alice.c b/keyboards/projectkb/alice/alice.c index ca0c7da2b..b82e2050e 100644 --- a/keyboards/projectkb/alice/alice.c +++ b/keyboards/projectkb/alice/alice.c | |||
| @@ -1,17 +1,17 @@ | |||
| 1 | #include "alice.h" | 1 | #include "alice.h" |
| 2 | 2 | ||
| 3 | void matrix_init_board(void){ | 3 | void matrix_init_board(void){ |
| 4 | setPinOutput(A0); | 4 | setPinOutput(INDICATOR_PIN_0); |
| 5 | setPinOutput(A1); | 5 | setPinOutput(INDICATOR_PIN_1); |
| 6 | setPinOutput(A2); | 6 | setPinOutput(INDICATOR_PIN_2); |
| 7 | } | 7 | } |
| 8 | 8 | ||
| 9 | bool led_update_kb(led_t led_state) { | 9 | bool led_update_kb(led_t led_state) { |
| 10 | bool runDefault = led_update_user(led_state); | 10 | bool runDefault = led_update_user(led_state); |
| 11 | if (runDefault) { | 11 | if (runDefault) { |
| 12 | writePin(A0, !led_state.num_lock); | 12 | writePin(INDICATOR_PIN_0, !led_state.num_lock); |
| 13 | writePin(A1, !led_state.caps_lock); | 13 | writePin(INDICATOR_PIN_1, !led_state.caps_lock); |
| 14 | writePin(A2, !led_state.scroll_lock); | 14 | writePin(INDICATOR_PIN_2, !led_state.scroll_lock); |
| 15 | } | 15 | } |
| 16 | return runDefault; | 16 | return runDefault; |
| 17 | } | 17 | } |
diff --git a/keyboards/projectkb/alice/readme.md b/keyboards/projectkb/alice/readme.md index 583ddf592..193343b31 100644 --- a/keyboards/projectkb/alice/readme.md +++ b/keyboards/projectkb/alice/readme.md | |||
| @@ -7,7 +7,7 @@ Keyboard Maintainer: onefiftynine | |||
| 7 | Hardware Supported: STM32F072CBT6 | 7 | Hardware Supported: STM32F072CBT6 |
| 8 | Make example for this keyboard (after setting up your build environment): | 8 | Make example for this keyboard (after setting up your build environment): |
| 9 | 9 | ||
| 10 | make projectkb/alice:default | 10 | make projectkb/alice/rev2:default |
| 11 | 11 | ||
| 12 | If you are flashing this keyboard/pcb for the first time: | 12 | If you are flashing this keyboard/pcb for the first time: |
| 13 | 13 | ||
diff --git a/keyboards/projectkb/alice/config.h b/keyboards/projectkb/alice/rev1/config.h index 11863b807..549af2928 100644 --- a/keyboards/projectkb/alice/config.h +++ b/keyboards/projectkb/alice/rev1/config.h | |||
| @@ -58,6 +58,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 58 | #define WS2812_SPI SPID2 | 58 | #define WS2812_SPI SPID2 |
| 59 | #define WS2812_SPI_MOSI_PAL_MODE 0 | 59 | #define WS2812_SPI_MOSI_PAL_MODE 0 |
| 60 | 60 | ||
| 61 | #define INDICATOR_PIN_0 A0 | ||
| 62 | #define INDICATOR_PIN_1 A1 | ||
| 63 | #define INDICATOR_PIN_2 A2 | ||
| 61 | 64 | ||
| 62 | // 2 bits for 4 layout options | 65 | // 2 bits for 4 layout options |
| 63 | #define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2 | 66 | #define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2 |
diff --git a/keyboards/projectkb/alice/rev1/rules.mk b/keyboards/projectkb/alice/rev1/rules.mk new file mode 100644 index 000000000..258444db4 --- /dev/null +++ b/keyboards/projectkb/alice/rev1/rules.mk | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = STM32F072 | ||
| 3 | |||
| 4 | # Build Options | ||
| 5 | # change yes to no to disable | ||
| 6 | # | ||
| 7 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
| 8 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 9 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 10 | CONSOLE_ENABLE = yes # Console for debug | ||
| 11 | COMMAND_ENABLE = yes # Commands for debug and configuration | ||
| 12 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 13 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 14 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 15 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
| 16 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality | ||
| 17 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
| 18 | MIDI_ENABLE = no # MIDI support | ||
| 19 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 20 | AUDIO_ENABLE = no # Audio output on port C6 | ||
| 21 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | ||
| 22 | HD44780_ENABLE = no # Enable support for HD44780 based LCDs | ||
| 23 | WS2812_DRIVER = spi | ||
| 24 | |||
| 25 | |||
| 26 | # Enter lower-power sleep mode when on the ChibiOS idle thread | ||
| 27 | OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE | ||
diff --git a/keyboards/projectkb/alice/rev2/config.h b/keyboards/projectkb/alice/rev2/config.h new file mode 100644 index 000000000..eb3332026 --- /dev/null +++ b/keyboards/projectkb/alice/rev2/config.h | |||
| @@ -0,0 +1,85 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2015 Jun Wako <wakojun@gmail.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 | #pragma once | ||
| 19 | |||
| 20 | /* USB Device descriptor parameter */ | ||
| 21 | #define VENDOR_ID 0x0159 | ||
| 22 | #define PRODUCT_ID 0xA71C | ||
| 23 | #define DEVICE_VER 0x0001 | ||
| 24 | #define MANUFACTURER ProjectKB | ||
| 25 | #define PRODUCT Alice | ||
| 26 | #define DESCRIPTION ProjectKB Alice | ||
| 27 | |||
| 28 | /* key matrix size */ | ||
| 29 | #define MATRIX_ROWS 5 | ||
| 30 | #define MATRIX_COLS 16 | ||
| 31 | |||
| 32 | #define MATRIX_COL_PINS { B1, B0, A7, A1, A5, A4, A3, A10, B9, B8, B7, B6, B5, B4, B3, A15 } | ||
| 33 | #define MATRIX_ROW_PINS { B2, B10, B11, A2, A0 } | ||
| 34 | #define DIODE_DIRECTION COL2ROW | ||
| 35 | |||
| 36 | #define BACKLIGHT_PIN A6 | ||
| 37 | #define BACKLIGHT_PWM_DRIVER PWMD3 | ||
| 38 | #define BACKLIGHT_PWM_CHANNEL 1 | ||
| 39 | #define BACKLIGHT_PAL_MODE 1 | ||
| 40 | #define BACKLIGHT_LEVELS 6 | ||
| 41 | #define BACKLIGHT_BREATHING | ||
| 42 | #define BREATHING_PERIOD 6 | ||
| 43 | |||
| 44 | /* define if matrix has ghost */ | ||
| 45 | //#define MATRIX_HAS_GHOST | ||
| 46 | |||
| 47 | /* Set 0 if debouncing isn't needed */ | ||
| 48 | #define DEBOUNCE 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 | #define RGBLIGHT_ANIMATIONS | ||
| 56 | #define RGB_DI_PIN B15 | ||
| 57 | #define RGBLED_NUM 14 | ||
| 58 | #define WS2812_SPI SPID2 | ||
| 59 | #define WS2812_SPI_MOSI_PAL_MODE 0 | ||
| 60 | |||
| 61 | #define INDICATOR_PIN_0 A9 | ||
| 62 | #define INDICATOR_PIN_1 A8 | ||
| 63 | #define INDICATOR_PIN_2 B12 | ||
| 64 | |||
| 65 | |||
| 66 | // 2 bits for 4 layout options | ||
| 67 | #define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2 | ||
| 68 | |||
| 69 | /* | ||
| 70 | * Feature disable options | ||
| 71 | * These options are also useful to firmware size reduction. | ||
| 72 | */ | ||
| 73 | |||
| 74 | /* disable debug print */ | ||
| 75 | //#define NO_DEBUG | ||
| 76 | |||
| 77 | /* disable print */ | ||
| 78 | //#define NO_PRINT | ||
| 79 | |||
| 80 | /* disable action features */ | ||
| 81 | //#define NO_ACTION_LAYER | ||
| 82 | //#define NO_ACTION_TAPPING | ||
| 83 | //#define NO_ACTION_ONESHOT | ||
| 84 | //#define NO_ACTION_MACRO | ||
| 85 | //#define NO_ACTION_FUNCTION | ||
diff --git a/keyboards/projectkb/alice/rev2/rules.mk b/keyboards/projectkb/alice/rev2/rules.mk new file mode 100644 index 000000000..258444db4 --- /dev/null +++ b/keyboards/projectkb/alice/rev2/rules.mk | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = STM32F072 | ||
| 3 | |||
| 4 | # Build Options | ||
| 5 | # change yes to no to disable | ||
| 6 | # | ||
| 7 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
| 8 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 9 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 10 | CONSOLE_ENABLE = yes # Console for debug | ||
| 11 | COMMAND_ENABLE = yes # Commands for debug and configuration | ||
| 12 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 13 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 14 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 15 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
| 16 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality | ||
| 17 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
| 18 | MIDI_ENABLE = no # MIDI support | ||
| 19 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 20 | AUDIO_ENABLE = no # Audio output on port C6 | ||
| 21 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | ||
| 22 | HD44780_ENABLE = no # Enable support for HD44780 based LCDs | ||
| 23 | WS2812_DRIVER = spi | ||
| 24 | |||
| 25 | |||
| 26 | # Enter lower-power sleep mode when on the ChibiOS idle thread | ||
| 27 | OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE | ||
diff --git a/keyboards/projectkb/alice/rules.mk b/keyboards/projectkb/alice/rules.mk index 0f9d71b89..d67257699 100644 --- a/keyboards/projectkb/alice/rules.mk +++ b/keyboards/projectkb/alice/rules.mk | |||
| @@ -1,22 +1 @@ | |||
| 1 | # MCU name | DEFAULT_FOLDER = projectkb/alice/rev1 | |
| 2 | MCU = STM32F072 | ||
| 3 | |||
| 4 | # Build Options | ||
| 5 | # comment out to disable the options. | ||
| 6 | # | ||
| 7 | |||
| 8 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
| 9 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 10 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 11 | CONSOLE_ENABLE = yes # Console for debug | ||
| 12 | COMMAND_ENABLE = yes # Commands for debug and configuration | ||
| 13 | SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend | ||
| 14 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
| 15 | CUSTOM_MATRIX = no # Custom matrix file | ||
| 16 | BACKLIGHT_ENABLE = yes | ||
| 17 | RGBLIGHT_ENABLE = yes | ||
| 18 | WS2812_DRIVER = spi | ||
| 19 | |||
| 20 | |||
| 21 | # Enter lower-power sleep mode when on the ChibiOS idle thread | ||
| 22 | OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE | ||
