diff options
author | MechMerlin <30334081+mechmerlin@users.noreply.github.com> | 2019-09-18 18:42:53 -0700 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2019-09-18 18:42:53 -0700 |
commit | 7a5a2591ebc797d9670366a45396afed48c5fc6f (patch) | |
tree | aa41b7c4981dd8988dc6d59ad831100715c40ed4 | |
parent | 7142b604058483a99a5fd476d5c95aa6ac52a1f8 (diff) | |
download | qmk_firmware-7a5a2591ebc797d9670366a45396afed48c5fc6f.tar.gz qmk_firmware-7a5a2591ebc797d9670366a45396afed48c5fc6f.zip |
[Keyboard] 1up60hte cleanup + bugfix (#6763)
* move caps lock led to keyboard level so even QMK Configurator users have access to it
* set bootloader correctly to atmel-dfu
* clean up extra carriage return
-rw-r--r-- | keyboards/1upkeyboards/1up60hte/1up60hte.c | 16 | ||||
-rw-r--r-- | keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c | 19 | ||||
-rw-r--r-- | keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c | 19 | ||||
-rw-r--r-- | keyboards/1upkeyboards/1up60hte/readme.md | 1 | ||||
-rw-r--r-- | keyboards/1upkeyboards/1up60hte/rules.mk | 43 |
5 files changed, 18 insertions, 80 deletions
diff --git a/keyboards/1upkeyboards/1up60hte/1up60hte.c b/keyboards/1upkeyboards/1up60hte/1up60hte.c index 460e42a0e..3af0e9d40 100644 --- a/keyboards/1upkeyboards/1up60hte/1up60hte.c +++ b/keyboards/1upkeyboards/1up60hte/1up60hte.c | |||
@@ -16,3 +16,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include "1up60hte.h" | 18 | #include "1up60hte.h" |
19 | |||
20 | void keyboard_pre_init_kb(void) { | ||
21 | // put your keyboard start-up code here | ||
22 | // runs once when the firmware starts up | ||
23 | setPinOutput(B6); | ||
24 | keyboard_pre_init_user(); | ||
25 | } | ||
26 | |||
27 | void led_set_kb(uint8_t usb_led) { | ||
28 | if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { | ||
29 | writePinLow(B6); | ||
30 | } else { | ||
31 | writePinHigh(B6); | ||
32 | } | ||
33 | led_set_user(usb_led); | ||
34 | } \ No newline at end of file | ||
diff --git a/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c b/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c index 359ac7540..2f91e1c76 100644 --- a/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c +++ b/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c | |||
@@ -31,22 +31,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
31 | KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, | 31 | KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, |
32 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) | 32 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) |
33 | }; | 33 | }; |
34 | |||
35 | void matrix_init_user(void) { | ||
36 | setPinOutput(B6); | ||
37 | } | ||
38 | |||
39 | void matrix_scan_user(void) { | ||
40 | } | ||
41 | |||
42 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
43 | return true; | ||
44 | } | ||
45 | |||
46 | void led_set_user(uint8_t usb_led) { | ||
47 | if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { | ||
48 | writePinLow(B6); | ||
49 | } else { | ||
50 | writePinHigh(B6); | ||
51 | } | ||
52 | } | ||
diff --git a/keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c b/keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c index 5312e3b67..81e29ec19 100644 --- a/keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c +++ b/keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c | |||
@@ -31,22 +31,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
31 | KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, | 31 | KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, |
32 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) | 32 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) |
33 | }; | 33 | }; |
34 | |||
35 | void matrix_init_user(void) { | ||
36 | setPinOutput(B6); | ||
37 | } | ||
38 | |||
39 | void matrix_scan_user(void) { | ||
40 | } | ||
41 | |||
42 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
43 | return true; | ||
44 | } | ||
45 | |||
46 | void led_set_user(uint8_t usb_led) { | ||
47 | if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { | ||
48 | writePinLow(B6); | ||
49 | } else { | ||
50 | writePinHigh(B6); | ||
51 | } | ||
52 | } | ||
diff --git a/keyboards/1upkeyboards/1up60hte/readme.md b/keyboards/1upkeyboards/1up60hte/readme.md index 93767c541..b49773fd7 100644 --- a/keyboards/1upkeyboards/1up60hte/readme.md +++ b/keyboards/1upkeyboards/1up60hte/readme.md | |||
@@ -8,7 +8,6 @@ A 60% PCB with USB C, RGB underglow, backlighting, hotswappable switches, and a | |||
8 | 8 | ||
9 | Keyboard Maintainer: [Bubnick](https://github.com/bubnick) | 9 | Keyboard Maintainer: [Bubnick](https://github.com/bubnick) |
10 | Hardware Supported: 1up60hte 60% PCB | 10 | Hardware Supported: 1up60hte 60% PCB |
11 | |||
12 | Hardware Availability: [1upkeyboards.com](https://www.1upkeyboards.com/shop/controllers/1up-rgb-60-pcb-hte/) | 11 | Hardware Availability: [1upkeyboards.com](https://www.1upkeyboards.com/shop/controllers/1up-rgb-60-pcb-hte/) |
13 | 12 | ||
14 | Make example for this keyboard (after setting up your build environment): | 13 | Make example for this keyboard (after setting up your build environment): |
diff --git a/keyboards/1upkeyboards/1up60hte/rules.mk b/keyboards/1upkeyboards/1up60hte/rules.mk index 860a754a6..e994785ba 100644 --- a/keyboards/1upkeyboards/1up60hte/rules.mk +++ b/keyboards/1upkeyboards/1up60hte/rules.mk | |||
@@ -1,50 +1,12 @@ | |||
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 = yes # Virtual DIP switch configuration(+1000) | 9 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) |
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) |
@@ -54,6 +16,5 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https:/ | |||
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 |
57 | EXTRAFLAGS += -flto | ||
58 | 19 | ||
59 | LAYOUTS = 60_hhkb | 20 | LAYOUTS = 60_hhkb |