diff options
| author | Oscillope <jvrosenman@gmail.com> | 2018-10-11 20:00:17 -0400 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2018-10-11 17:00:17 -0700 |
| commit | 8a778d656dc42289b4cc344c8ef0abae2de73eff (patch) | |
| tree | 4f39a1a0579ce9e8e3928435bfc96051b01cfd48 /keyboards/jj40 | |
| parent | a7d05820a6258178b7ea440ee2781edf074d8f41 (diff) | |
| download | qmk_firmware-8a778d656dc42289b4cc344c8ef0abae2de73eff.tar.gz qmk_firmware-8a778d656dc42289b4cc344c8ef0abae2de73eff.zip | |
Keymap: Undo my backlight workaround (#4122)
* Update jj40 keymap for easier pgup/pgdn
* Backlight problem fixed by a previous commit
Diffstat (limited to 'keyboards/jj40')
| -rw-r--r-- | keyboards/jj40/keymaps/oscillope/backlight.c | 60 | ||||
| -rw-r--r-- | keyboards/jj40/keymaps/oscillope/keymap.c | 4 |
2 files changed, 2 insertions, 62 deletions
diff --git a/keyboards/jj40/keymaps/oscillope/backlight.c b/keyboards/jj40/keymaps/oscillope/backlight.c deleted file mode 100644 index 14c677cd6..000000000 --- a/keyboards/jj40/keymaps/oscillope/backlight.c +++ /dev/null | |||
| @@ -1,60 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * Backlighting code for PS2AVRGB boards (ATMEGA32A) | ||
| 3 | * Kenneth A. (github.com/krusli | krusli.me) | ||
| 4 | */ | ||
| 5 | |||
| 6 | #include "quantum.h" | ||
| 7 | |||
| 8 | #include <avr/pgmspace.h> | ||
| 9 | #include <avr/interrupt.h> | ||
| 10 | |||
| 11 | // Port D: digital pins of the AVR chipset | ||
| 12 | #define NUMLOCK_PORT (1 << 0) // D0 | ||
| 13 | #define CAPSLOCK_PORT (1 << 1) // D1 | ||
| 14 | #define BACKLIGHT_PORT (1 << 4) // D4 | ||
| 15 | #define SCROLLLOCK_PORT (1 << 6) // D6 | ||
| 16 | |||
| 17 | /** | ||
| 18 | * References | ||
| 19 | * Port Registers: https://www.arduino.cc/en/Reference/PortManipulation | ||
| 20 | * TCCR1A: https://electronics.stackexchange.com/questions/92350/what-is-the-difference-between-tccr1a-and-tccr1b | ||
| 21 | * Timers: http://www.avrbeginners.net/architecture/timers/timers.html | ||
| 22 | * 16-bit timer setup: http://sculland.com/ATmega168/Interrupts-And-Timers/16-Bit-Timer-Setup/ | ||
| 23 | * PS2AVRGB firmware: https://github.com/showjean/ps2avrU/tree/master/firmware | ||
| 24 | */ | ||
| 25 | |||
| 26 | // @Override | ||
| 27 | // turn LEDs on and off depending on USB caps/num/scroll lock states. | ||
| 28 | __attribute__ ((weak)) | ||
| 29 | void led_set_user(uint8_t usb_led) { | ||
| 30 | /* It appears that these cause the v1 JJ40 PCB to hang. | ||
| 31 | * I haven't looked into why, but I don't have any LEDs on my board anyway. */ | ||
| 32 | #if 0 | ||
| 33 | if (usb_led & (1 << USB_LED_NUM_LOCK)) { | ||
| 34 | // turn on | ||
| 35 | DDRD |= NUMLOCK_PORT; | ||
| 36 | PORTD |= NUMLOCK_PORT; | ||
| 37 | } else { | ||
| 38 | // turn off | ||
| 39 | DDRD &= ~NUMLOCK_PORT; | ||
| 40 | PORTD &= ~NUMLOCK_PORT; | ||
| 41 | } | ||
| 42 | |||
| 43 | if (usb_led & (1 << USB_LED_CAPS_LOCK)) { | ||
| 44 | DDRD |= CAPSLOCK_PORT; | ||
| 45 | PORTD |= CAPSLOCK_PORT; | ||
| 46 | } else { | ||
| 47 | DDRD &= ~CAPSLOCK_PORT; | ||
| 48 | PORTD &= ~CAPSLOCK_PORT; | ||
| 49 | } | ||
| 50 | |||
| 51 | if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { | ||
| 52 | DDRD |= SCROLLLOCK_PORT; | ||
| 53 | PORTD |= SCROLLLOCK_PORT; | ||
| 54 | } else { | ||
| 55 | DDRD &= ~SCROLLLOCK_PORT; | ||
| 56 | PORTD &= ~SCROLLLOCK_PORT; | ||
| 57 | } | ||
| 58 | #endif | ||
| 59 | } | ||
| 60 | |||
diff --git a/keyboards/jj40/keymaps/oscillope/keymap.c b/keyboards/jj40/keymaps/oscillope/keymap.c index 49ceff864..8b30f52c8 100644 --- a/keyboards/jj40/keymaps/oscillope/keymap.c +++ b/keyboards/jj40/keymaps/oscillope/keymap.c | |||
| @@ -62,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 62 | * ,-----------------------------------------------------------------------------------. | 62 | * ,-----------------------------------------------------------------------------------. |
| 63 | * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | 63 | * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | |
| 64 | * |------+------+------+------+------+-------------+------+------+------+------+------| | 64 | * |------+------+------+------+------+-------------+------+------+------+------+------| |
| 65 | * | Ins | | | () | [] | {} | Left | Down | Up |Right | | | | 65 | * | Ins | | | () | [] | {} | Home | PgDn | PgUp | End | | | |
| 66 | * |------+------+------+------+------+------|------+------+------+------+------+------| | 66 | * |------+------+------+------+------+------|------+------+------+------+------+------| |
| 67 | * |RESET | Back | Fwd | | | | | | Mute | Vol- | Vol+ | | | 67 | * |RESET | Back | Fwd | | | | | | Mute | Vol- | Vol+ | | |
| 68 | * |------+------+------+------+------+------+------+------+------+------+------+------| | 68 | * |------+------+------+------+------+------+------+------+------+------+------+------| |
| @@ -71,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 71 | */ | 71 | */ |
| 72 | [_LOWER] = KEYMAP( \ | 72 | [_LOWER] = KEYMAP( \ |
| 73 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ | 73 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ |
| 74 | KC_INS, _______, _______, CC_PRN, CC_BRC, CC_CBR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \ | 74 | KC_INS, _______, _______, CC_PRN, CC_BRC, CC_CBR, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, \ |
| 75 | RESET, KC_WBAK, KC_WFWD, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, \ | 75 | RESET, KC_WBAK, KC_WFWD, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, \ |
| 76 | _______, _______, _______, _______, KC_LOCK, _______, _______, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT \ | 76 | _______, _______, _______, _______, KC_LOCK, _______, _______, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT \ |
| 77 | ), | 77 | ), |
