From d14ef52b804115bd07f2c22de7d354d6e9e94c58 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 14 Aug 2019 20:08:01 +0100 Subject: [Keymap] Update gherkin to use gpio (#6520) --- .../40percentclub/gherkin/keymaps/default/keymap.c | 44 ++++++---------------- 1 file changed, 11 insertions(+), 33 deletions(-) (limited to 'keyboards/40percentclub/gherkin') diff --git a/keyboards/40percentclub/gherkin/keymaps/default/keymap.c b/keyboards/40percentclub/gherkin/keymaps/default/keymap.c index ae6f158627..9d1a67bd38 100644 --- a/keyboards/40percentclub/gherkin/keymaps/default/keymap.c +++ b/keyboards/40percentclub/gherkin/keymaps/default/keymap.c @@ -18,46 +18,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -void matrix_init_user(void) { -} - -void matrix_scan_user(void) { -} +void keyboard_pre_init_user(void) { + // Call the keyboard pre init code. -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; + // Set our LED pins as output + setPinOutput(D5); + setPinOutput(B0); } void led_set_user(uint8_t usb_led) { - - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - DDRD |= (1 << 5); PORTD &= ~(1 << 5); - } else { - DDRD &= ~(1 << 5); PORTD &= ~(1 << 5); - } - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 0); PORTB &= ~(1 << 0); - } else { - DDRB &= ~(1 << 0); PORTB &= ~(1 << 0); - } - - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_COMPOSE)) { - + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinLow(D5); } else { - + writePinHigh(D5); } - if (usb_led & (1 << USB_LED_KANA)) { - + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(B0); } else { - + writePinHigh(B0); } - } -- cgit v1.2.3 From 237147ca236b0e942fc14e73010479a2785bf764 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Tue, 24 Sep 2019 17:59:17 +1000 Subject: Cleanup rules.mk for 32U4 keyboards, 0-9 (#6789) --- keyboards/40percentclub/gherkin/rules.mk | 50 ++------------------------------ 1 file changed, 2 insertions(+), 48 deletions(-) (limited to 'keyboards/40percentclub/gherkin') diff --git a/keyboards/40percentclub/gherkin/rules.mk b/keyboards/40percentclub/gherkin/rules.mk index 1e0b346417..190aea355a 100644 --- a/keyboards/40percentclub/gherkin/rules.mk +++ b/keyboards/40percentclub/gherkin/rules.mk @@ -1,62 +1,16 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # comment out to disable the options. # -- cgit v1.2.3 From 26fe4e44d56e19a2c045e2558856fdcecd361737 Mon Sep 17 00:00:00 2001 From: Diego <921798+diegor2@users.noreply.github.com> Date: Mon, 7 Oct 2019 15:57:35 -0300 Subject: [Keymap] Fix talljoe-gherkin keymap typo (#6950) --- keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards/40percentclub/gherkin') diff --git a/keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/keymap.c b/keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/keymap.c index ca3da579a1..2c3e872265 100644 --- a/keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/keymap.c +++ b/keyboards/40percentclub/gherkin/keymaps/talljoe-gherkin/keymap.c @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_RAISE] = LAYOUT_ortho_3x10( - KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_7, KC_9, KC_0, + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_ESC, KC_MINS, KC_EQL, _______, KC_LBRC, KC_RBRC, _______, KC_QUOT, KC_SCLN, _______, OS_LCTL, OS_LGUI, OS_LALT, KC_GRV, _______, KC_TAB, KC_BSLS, KC_COMM, KC_DOT, KC_SLSH ), -- cgit v1.2.3