diff --git a/keyboards/zsa/ergodox_ez/ergodox_ez.c b/keyboards/zsa/ergodox_ez/ergodox_ez.c index 73b47cdda73f..21436e28971a 100644 --- a/keyboards/zsa/ergodox_ez/ergodox_ez.c +++ b/keyboards/zsa/ergodox_ez/ergodox_ez.c @@ -55,14 +55,17 @@ void ergodox_board_led_on(void) { } __attribute__((weak)) void ergodox_right_led_1_on(void) { + gpio_set_pin_output(ERGODOX_LED_1_PIN); gpio_write_pin_high(ERGODOX_LED_1_PIN); } __attribute__((weak)) void ergodox_right_led_2_on(void) { + gpio_set_pin_output(ERGODOX_LED_2_PIN); gpio_write_pin_high(ERGODOX_LED_2_PIN); } __attribute__((weak)) void ergodox_right_led_3_on(void) { + gpio_set_pin_output(ERGODOX_LED_3_PIN); gpio_write_pin_high(ERGODOX_LED_3_PIN); } @@ -77,14 +80,17 @@ void ergodox_board_led_off(void) { } __attribute__((weak)) void ergodox_right_led_1_off(void) { + gpio_set_pin_input(ERGODOX_LED_1_PIN); gpio_write_pin_low(ERGODOX_LED_1_PIN); } __attribute__((weak)) void ergodox_right_led_2_off(void) { + gpio_set_pin_input(ERGODOX_LED_2_PIN); gpio_write_pin_low(ERGODOX_LED_2_PIN); } __attribute__((weak)) void ergodox_right_led_3_off(void) { + gpio_set_pin_input(ERGODOX_LED_3_PIN); gpio_write_pin_low(ERGODOX_LED_3_PIN); } diff --git a/keyboards/zsa/ergodox_ez/keymaps/default/keymap.c b/keyboards/zsa/ergodox_ez/keymaps/default/keymap.c index 0a40cc91fddc..ac80c9985372 100644 --- a/keyboards/zsa/ergodox_ez/keymaps/default/keymap.c +++ b/keyboards/zsa/ergodox_ez/keymaps/default/keymap.c @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), GUI_T(KC_QUOT), KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), MEH_T(KC_NO), KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - LT(SYMB,KC_GRV), KC_QUOT, LALT(KC_LSFT), KC_LEFT, KC_RGHT, KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, TT(SYMB), + LT(SYMB,KC_GRV), KC_QUOT, LALT(KC_LSFT), KC_LEFT, KC_RGHT, KC_UP, KC_DOWN, KC_LBRC, LED_LEVEL, TT(SYMB), ALT_T(KC_APP), KC_LGUI, KC_LALT, CTL_T(KC_ESC), KC_HOME, KC_PGUP, KC_SPC, KC_BSPC, KC_END, KC_PGDN, KC_TAB, KC_ENT @@ -72,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS, KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, KC_TRNS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, QK_BOOT, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_TRNS, KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, - EE_CLR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DOT, KC_0, KC_EQL, KC_TRNS, + EE_CLR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DOT, KC_0, KC_TRNS, KC_TRNS, RGB_MOD, KC_TRNS, RGB_TOG, RGB_M_P, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI, KC_TRNS, KC_TRNS, RGB_HUD, RGB_HUI diff --git a/keyboards/zsa/ergodox_ez/m32u4/m32u4.c b/keyboards/zsa/ergodox_ez/m32u4/m32u4.c index 07f47682791c..7f19250b4227 100644 --- a/keyboards/zsa/ergodox_ez/m32u4/m32u4.c +++ b/keyboards/zsa/ergodox_ez/m32u4/m32u4.c @@ -13,6 +13,29 @@ void ergodox_right_led_3_set(uint8_t n) { OCR1C = n; } +__attribute__((weak)) void ergodox_right_led_1_on(void) { + gpio_write_pin_high(ERGODOX_LED_1_PIN); +} + +__attribute__((weak)) void ergodox_right_led_2_on(void) { + gpio_write_pin_high(ERGODOX_LED_2_PIN); +} + +__attribute__((weak)) void ergodox_right_led_3_on(void) { + gpio_write_pin_high(ERGODOX_LED_3_PIN); +} +__attribute__((weak)) void ergodox_right_led_1_off(void) { + gpio_write_pin_low(ERGODOX_LED_1_PIN); +} + +__attribute__((weak)) void ergodox_right_led_2_off(void) { + gpio_write_pin_low(ERGODOX_LED_2_PIN); +} + +__attribute__((weak)) void ergodox_right_led_3_off(void) { + gpio_write_pin_low(ERGODOX_LED_3_PIN); +} + void keyboard_post_init_sub(void) { // keyboard LEDs (see "PWM on ports OC1(A|B|C)" in "teensy-2-0.md") TCCR1A = 0b10101001; // set and configure fast PWM