Skip to content

Commit

Permalink
Confirm working on AVR and ARM
Browse files Browse the repository at this point in the history
  • Loading branch information
drashna committed Nov 25, 2024
1 parent d386e81 commit c94230c
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
6 changes: 6 additions & 0 deletions keyboards/zsa/ergodox_ez/ergodox_ez.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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);
}

Expand Down
4 changes: 2 additions & 2 deletions keyboards/zsa/ergodox_ez/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
23 changes: 23 additions & 0 deletions keyboards/zsa/ergodox_ez/m32u4/m32u4.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c94230c

Please sign in to comment.