diff options
| author | MechMerlin <30334081+mechmerlin@users.noreply.github.com> | 2019-09-07 01:04:48 -0700 |
|---|---|---|
| committer | fauxpark <fauxpark@gmail.com> | 2019-09-07 18:04:48 +1000 |
| commit | fc5fb2fc1598bd07cafb97b35100237506592d9d (patch) | |
| tree | e677002ff8d3a018578a56b225b798861b0d3fc7 /keyboards/playkbtw | |
| parent | ac8f8a89141fb6830c1e510d0325092e549e9840 (diff) | |
| download | qmk_firmware-fc5fb2fc1598bd07cafb97b35100237506592d9d.tar.gz qmk_firmware-fc5fb2fc1598bd07cafb97b35100237506592d9d.zip | |
CA66 R1/R2 Cleanup (#6678)
* fixup readme to adhere to QMK standards and to also have more information
* use pragma once
* strip out the custom bootmagic lite routine as it is the same as QMK's default bootmagic lite routine. Also add the caps lock led indicator
* turn on bootmagic lite
* update default keymap
* Update keyboards/playkbtw/ca66/ca66.c
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* remove lines 4 thru 37 and add bootloader
Diffstat (limited to 'keyboards/playkbtw')
| -rw-r--r-- | keyboards/playkbtw/ca66/ca66.c | 34 | ||||
| -rw-r--r-- | keyboards/playkbtw/ca66/ca66.h | 5 | ||||
| -rw-r--r-- | keyboards/playkbtw/ca66/config.h | 7 | ||||
| -rw-r--r-- | keyboards/playkbtw/ca66/keymaps/default/keymap.c | 18 | ||||
| -rw-r--r-- | keyboards/playkbtw/ca66/readme.md | 11 | ||||
| -rw-r--r-- | keyboards/playkbtw/ca66/rules.mk | 60 |
6 files changed, 28 insertions, 107 deletions
diff --git a/keyboards/playkbtw/ca66/ca66.c b/keyboards/playkbtw/ca66/ca66.c index 5f61df64e..43a648eca 100644 --- a/keyboards/playkbtw/ca66/ca66.c +++ b/keyboards/playkbtw/ca66/ca66.c | |||
| @@ -1,30 +1,12 @@ | |||
| 1 | #include "ca66.h" | 1 | #include "ca66.h" |
| 2 | #include "config.h" | ||
| 3 | 2 | ||
| 4 | void bootmagic_lite(void) | 3 | void led_set_kb(uint8_t usb_led) { |
| 5 | { | 4 | // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here |
| 6 | // The lite version of TMK's bootmagic. | 5 | if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { |
| 7 | // 100% less potential for accidentally making the | 6 | writePinHigh(D1); |
| 8 | // keyboard do stupid things. | 7 | } else { |
| 8 | writePinLow(D1); | ||
| 9 | } | ||
| 9 | 10 | ||
| 10 | // We need multiple scans because debouncing can't be turned off. | 11 | led_set_user(usb_led); |
| 11 | matrix_scan(); | ||
| 12 | wait_ms(DEBOUNCE); | ||
| 13 | matrix_scan(); | ||
| 14 | |||
| 15 | // If the Esc (matrix 0,0) is held down on power up, | ||
| 16 | // reset the EEPROM valid state and jump to bootloader. | ||
| 17 | if ( matrix_get_row(0) & (1<<0) ) | ||
| 18 | { | ||
| 19 | // Set the TMK/QMK EEPROM state as invalid. | ||
| 20 | eeconfig_disable(); | ||
| 21 | // Jump to bootloader. | ||
| 22 | bootloader_jump(); | ||
| 23 | } | ||
| 24 | } | ||
| 25 | |||
| 26 | void matrix_init_kb(void) | ||
| 27 | { | ||
| 28 | bootmagic_lite(); | ||
| 29 | matrix_init_user(); | ||
| 30 | } | 12 | } |
diff --git a/keyboards/playkbtw/ca66/ca66.h b/keyboards/playkbtw/ca66/ca66.h index 0c00125a3..e52bdea66 100644 --- a/keyboards/playkbtw/ca66/ca66.h +++ b/keyboards/playkbtw/ca66/ca66.h | |||
| @@ -1,5 +1,4 @@ | |||
| 1 | #ifndef CA66_H | 1 | #pragma once |
| 2 | #define CA66_H | ||
| 3 | 2 | ||
| 4 | #include "quantum.h" | 3 | #include "quantum.h" |
| 5 | 4 | ||
| @@ -16,5 +15,3 @@ | |||
| 16 | { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ | 15 | { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ |
| 17 | { KC_NO, K401, K402, K403, K404, KC_NO, K406, KC_NO, K408, K409, K410, K411, K412, K413, K414 } \ | 16 | { KC_NO, K401, K402, K403, K404, KC_NO, K406, KC_NO, K408, K409, K410, K411, K412, K413, K414 } \ |
| 18 | } | 17 | } |
| 19 | |||
| 20 | #endif | ||
diff --git a/keyboards/playkbtw/ca66/config.h b/keyboards/playkbtw/ca66/config.h index b4c0e6234..ff68cdac9 100644 --- a/keyboards/playkbtw/ca66/config.h +++ b/keyboards/playkbtw/ca66/config.h | |||
| @@ -1,5 +1,4 @@ | |||
| 1 | #ifndef CONFIG_H | 1 | #pragma once |
| 2 | #define CONFIG_H | ||
| 3 | 2 | ||
| 4 | #include "config_common.h" | 3 | #include "config_common.h" |
| 5 | 4 | ||
| @@ -15,7 +14,7 @@ | |||
| 15 | #define MATRIX_ROWS 5 | 14 | #define MATRIX_ROWS 5 |
| 16 | #define MATRIX_COLS 15 | 15 | #define MATRIX_COLS 15 |
| 17 | 16 | ||
| 18 | /* key matrix pins */ | 17 | /* key matrix pins 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14*/ |
| 19 | #define MATRIX_ROW_PINS { F5, F4, F1, B0, B3 } | 18 | #define MATRIX_ROW_PINS { F5, F4, F1, B0, B3 } |
| 20 | #define MATRIX_COL_PINS { F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, F6, B7, E6 } | 19 | #define MATRIX_COL_PINS { F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, F6, B7, E6 } |
| 21 | #define UNUSED_PINS | 20 | #define UNUSED_PINS |
| @@ -45,5 +44,3 @@ | |||
| 45 | #define RGBLIGHT_SAT_STEP 8 | 44 | #define RGBLIGHT_SAT_STEP 8 |
| 46 | #define RGBLIGHT_VAL_STEP 8 | 45 | #define RGBLIGHT_VAL_STEP 8 |
| 47 | #endif | 46 | #endif |
| 48 | |||
| 49 | #endif | ||
diff --git a/keyboards/playkbtw/ca66/keymaps/default/keymap.c b/keyboards/playkbtw/ca66/keymaps/default/keymap.c index 5a3c4c862..6f87fb0c1 100644 --- a/keyboards/playkbtw/ca66/keymaps/default/keymap.c +++ b/keyboards/playkbtw/ca66/keymaps/default/keymap.c | |||
| @@ -16,21 +16,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 16 | KC_LSFT, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, RGB_HUI, KC_END, | 16 | KC_LSFT, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, RGB_HUI, KC_END, |
| 17 | KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SAD, RGB_HUD, RGB_SAI), | 17 | KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SAD, RGB_HUD, RGB_SAI), |
| 18 | }; | 18 | }; |
| 19 | |||
| 20 | void matrix_init_user(void) { | ||
| 21 | } | ||
| 22 | |||
| 23 | void matrix_scan_user(void) { | ||
| 24 | } | ||
| 25 | |||
| 26 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 27 | return true; | ||
| 28 | } | ||
| 29 | |||
| 30 | void led_set_user(uint8_t usb_led) { | ||
| 31 | if (usb_led & (1 << USB_LED_CAPS_LOCK)) { | ||
| 32 | DDRD |= (1 << 1); PORTD &= ~(1 << 1); | ||
| 33 | } else { | ||
| 34 | DDRD &= ~(1 << 1); PORTD &= ~(1 << 1); | ||
| 35 | } | ||
| 36 | } | ||
diff --git a/keyboards/playkbtw/ca66/readme.md b/keyboards/playkbtw/ca66/readme.md index c415efd5f..94bf0d537 100644 --- a/keyboards/playkbtw/ca66/readme.md +++ b/keyboards/playkbtw/ca66/readme.md | |||
| @@ -1,15 +1,16 @@ | |||
| 1 | CA66 | 1 | # CA66 |
| 2 | == | ||
| 3 | 2 | ||
| 4 | Custom 65% | 3 | Custom 65% |
| 5 | 4 | ||
| 5 | This QMK firmware handles both PCBs from Round 1 and from Round 2. | ||
| 6 | |||
| 6 | Keyboard Maintainer: QMK Community | 7 | Keyboard Maintainer: QMK Community |
| 7 | Hardware Supported: CA66 | 8 | Hardware Supported: CA66 R1/R2 |
| 8 | Hardware Availability: [Play Keyboard](http://play-keyboard.store/) | 9 | Hardware Availability: [Play Keyboard](http://play-keyboard.store/) |
| 9 | 10 | ||
| 10 | 11 | ||
| 11 | Make example for this keyboard (after setting up your build environment): | 12 | Make example for this keyboard (after setting up your build environment): |
| 12 | 13 | ||
| 13 | make playkbtw/ca66:default | 14 | make playkbtw/ca66:default |
| 14 | 15 | ||
| 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. | 16 | 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/playkbtw/ca66/rules.mk b/keyboards/playkbtw/ca66/rules.mk index 5779b2c8a..e86f5ec03 100644 --- a/keyboards/playkbtw/ca66/rules.mk +++ b/keyboards/playkbtw/ca66/rules.mk | |||
| @@ -1,56 +1,18 @@ | |||
| 1 | # MCU name | 1 | # MCU name |
| 2 | MCU = atmega32u4 | 2 | MCU = atmega32u4 |
| 3 | 3 | ||
| 4 | # Processor frequency. | 4 | BOOTLOADER = atmel-dfu |
| 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 | |||
| 40 | # Boot Section Size in *bytes* | ||
| 41 | OPT_DEFS += -DBOOTLOADER_SIZE=4096 | ||
| 42 | |||
| 43 | 5 | ||
| 44 | # Build Options | 6 | # Build Options |
| 45 | # comment out to disable the options. | 7 | # comment out to disable the options. |
| 46 | # | 8 | # |
| 47 | BOOTMAGIC_ENABLE ?= no | 9 | BOOTMAGIC_ENABLE = lite |
| 48 | MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) | 10 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) |
| 49 | EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) | 11 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) |
| 50 | CONSOLE_ENABLE ?= no # Console for debug(+400) | 12 | CONSOLE_ENABLE = no # Console for debug(+400) |
| 51 | COMMAND_ENABLE ?= no # Commands for debug and configuration | 13 | COMMAND_ENABLE = no # Commands for debug and configuration |
| 52 | SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend | 14 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
| 53 | NKRO_ENABLE ?= yes # USB Nkey Rollover - 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 - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work |
| 54 | BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality | 16 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality |
| 55 | AUDIO_ENABLE ?= no | 17 | AUDIO_ENABLE = no |
| 56 | RGBLIGHT_ENABLE ?= yes | 18 | RGBLIGHT_ENABLE = yes |
