diff options
| author | Álvaro A. Volpato <alvaro.volpato@usp.br> | 2021-11-28 03:26:50 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-28 17:26:50 +1100 |
| commit | d4690d0c231e782961d5aa56686dd0981fe503cd (patch) | |
| tree | 21fb215f36bf0d3665c9fbd32686f5501abe38f2 /keyboards/primekb | |
| parent | 99c6829bf06b1cd43365e6c7ef2f136062b8ad06 (diff) | |
| download | qmk_firmware-d4690d0c231e782961d5aa56686dd0981fe503cd.tar.gz qmk_firmware-d4690d0c231e782961d5aa56686dd0981fe503cd.zip | |
Meridian LED update (#15329)
* Meridian first update
* Update README, adjust timing settings
* Update README
Diffstat (limited to 'keyboards/primekb')
| -rw-r--r-- | keyboards/primekb/meridian/ktr1010/config.h | 51 | ||||
| -rw-r--r-- | keyboards/primekb/meridian/ktr1010/rules.mk | 1 | ||||
| -rw-r--r-- | keyboards/primekb/meridian/readme.md | 24 | ||||
| -rw-r--r-- | keyboards/primekb/meridian/rules.mk | 1 | ||||
| -rw-r--r-- | keyboards/primekb/meridian/ws2812/config.h | 48 | ||||
| -rw-r--r-- | keyboards/primekb/meridian/ws2812/rules.mk | 1 |
6 files changed, 123 insertions, 3 deletions
diff --git a/keyboards/primekb/meridian/ktr1010/config.h b/keyboards/primekb/meridian/ktr1010/config.h new file mode 100644 index 000000000..bf91dc971 --- /dev/null +++ b/keyboards/primekb/meridian/ktr1010/config.h | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2020 Holten Campbell | ||
| 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 0x5052 | ||
| 22 | #define PRODUCT_ID 0x004D | ||
| 23 | #define DEVICE_VER 0x0001 | ||
| 24 | #define MANUFACTURER Prime Keyboards | ||
| 25 | #define PRODUCT Meridian | ||
| 26 | |||
| 27 | /* key matrix size */ | ||
| 28 | #define MATRIX_ROWS 5 | ||
| 29 | #define MATRIX_COLS 14 | ||
| 30 | |||
| 31 | #define MATRIX_COL_PINS { B11, B10, B2, B1, B0, A7, B9, B8, B7, B6, B5, B4, B3, A15 } | ||
| 32 | #define MATRIX_ROW_PINS { A6, A5, A4, A3, A2 } | ||
| 33 | #define DIODE_DIRECTION COL2ROW | ||
| 34 | |||
| 35 | #define RGB_DI_PIN B15 | ||
| 36 | #define RGBLED_NUM 3 | ||
| 37 | // Special timing definitions for KTR101 | ||
| 38 | #define WS2812_TIMING 1325 | ||
| 39 | #define WS2812_T0H 350 | ||
| 40 | #define WS2812_T1H 975 | ||
| 41 | #define WS2812_T0L 975 | ||
| 42 | #define WS2812_T1L 350 | ||
| 43 | #define WS2812_RES_US 100 | ||
| 44 | |||
| 45 | /* Set 0 if debouncing isn't needed */ | ||
| 46 | #define DEBOUNCE 5 | ||
| 47 | |||
| 48 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 49 | #define LOCKING_SUPPORT_ENABLE | ||
| 50 | /* Locking resynchronize hack */ | ||
| 51 | #define LOCKING_RESYNC_ENABLE | ||
diff --git a/keyboards/primekb/meridian/ktr1010/rules.mk b/keyboards/primekb/meridian/ktr1010/rules.mk new file mode 100644 index 000000000..1bc213906 --- /dev/null +++ b/keyboards/primekb/meridian/ktr1010/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| WS2812_DRIVER = bitbang | |||
diff --git a/keyboards/primekb/meridian/readme.md b/keyboards/primekb/meridian/readme.md index 0e3339a59..01df9c5ba 100644 --- a/keyboards/primekb/meridian/readme.md +++ b/keyboards/primekb/meridian/readme.md | |||
| @@ -5,8 +5,28 @@ | |||
| 5 | * Keyboard Maintainer: [Holten Campbell](https://github.com/holtenc) | 5 | * Keyboard Maintainer: [Holten Campbell](https://github.com/holtenc) |
| 6 | * Hardware Supported: STM32F072CBT6 | 6 | * Hardware Supported: STM32F072CBT6 |
| 7 | 7 | ||
| 8 | Make example for this keyboard (after setting up your build environment): | 8 | ## Compiling firmware and flashing |
| 9 | 9 | ||
| 10 | make primekb/meridian:default | 10 | ### Enter bootloader |
| 11 | |||
| 12 | The DFU state in the bootloader can be accessed in 3 ways: | ||
| 13 | |||
| 14 | * **Bootmagic reset**: hold down the key at (0,0) in the matrix (usually Escape) and plug in the keyboard; or | ||
| 15 | * **Physical reset button**: press the button on the bottom of the PCB; or | ||
| 16 | * **Keycode in layout**: press the key mapped to `RESET` if it is available (Escape key on layer 1 in the default layout). | ||
| 17 | |||
| 18 | ### Compile firmware | ||
| 19 | |||
| 20 | The Meridian PCB was delivered in two variants, equal in design but using different RGB LED models: one using WS2812 and another using KTR1010 LEDs. Both can be compiled using | ||
| 21 | |||
| 22 | make primekb/meridian/ws1812:default | ||
| 23 | make primekb/meridian/ktr1010:default | ||
| 24 | |||
| 25 | After compiling, enter bootloader in the PCB and flash the firmware using `dfu-util` or QMK Toolbox. For direct compile-and-flashing, put the PCB in DFU state and use | ||
| 26 | |||
| 27 | make primekb/meridian/ws1812:default:flash | ||
| 28 | make primekb/meridian/ktr1010:default:flash | ||
| 29 | |||
| 30 | VIA-supported firmwares are also available. | ||
| 11 | 31 | ||
| 12 | 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). | 32 | 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/primekb/meridian/rules.mk b/keyboards/primekb/meridian/rules.mk index fe92253a9..f6c9d4ee6 100644 --- a/keyboards/primekb/meridian/rules.mk +++ b/keyboards/primekb/meridian/rules.mk | |||
| @@ -19,7 +19,6 @@ NKRO_ENABLE = yes # USB Nkey Rollover | |||
| 19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | 19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality |
| 20 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | 20 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow |
| 21 | AUDIO_ENABLE = no # Audio output | 21 | AUDIO_ENABLE = no # Audio output |
| 22 | WS2812_DRIVER = spi | ||
| 23 | 22 | ||
| 24 | # Enter lower-power sleep mode when on the ChibiOS idle thread | 23 | # Enter lower-power sleep mode when on the ChibiOS idle thread |
| 25 | OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE | 24 | OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE |
diff --git a/keyboards/primekb/meridian/ws2812/config.h b/keyboards/primekb/meridian/ws2812/config.h new file mode 100644 index 000000000..082392c6b --- /dev/null +++ b/keyboards/primekb/meridian/ws2812/config.h | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2020 Holten Campbell | ||
| 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 0x5052 | ||
| 22 | #define PRODUCT_ID 0x004D | ||
| 23 | #define DEVICE_VER 0x0001 | ||
| 24 | #define MANUFACTURER Prime Keyboards | ||
| 25 | #define PRODUCT Meridian | ||
| 26 | |||
| 27 | /* key matrix size */ | ||
| 28 | #define MATRIX_ROWS 5 | ||
| 29 | #define MATRIX_COLS 14 | ||
| 30 | |||
| 31 | #define MATRIX_COL_PINS { B11, B10, B2, B1, B0, A7, B9, B8, B7, B6, B5, B4, B3, A15 } | ||
| 32 | #define MATRIX_ROW_PINS { A6, A5, A4, A3, A2 } | ||
| 33 | #define DIODE_DIRECTION COL2ROW | ||
| 34 | |||
| 35 | #define RGB_DI_PIN B15 | ||
| 36 | #define RGBLED_NUM 3 | ||
| 37 | #define WS2812_SPI SPID2 | ||
| 38 | #define WS2812_SPI_MOSI_PAL_MODE 0 | ||
| 39 | #define WS2812_SPI_SCK_PAL_MODE 0 | ||
| 40 | #define WS2812_SPI_SCK_PIN B13 | ||
| 41 | |||
| 42 | /* Set 0 if debouncing isn't needed */ | ||
| 43 | #define DEBOUNCE 5 | ||
| 44 | |||
| 45 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 46 | #define LOCKING_SUPPORT_ENABLE | ||
| 47 | /* Locking resynchronize hack */ | ||
| 48 | #define LOCKING_RESYNC_ENABLE | ||
diff --git a/keyboards/primekb/meridian/ws2812/rules.mk b/keyboards/primekb/meridian/ws2812/rules.mk new file mode 100644 index 000000000..c09c0d5fa --- /dev/null +++ b/keyboards/primekb/meridian/ws2812/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| WS2812_DRIVER = spi | |||
