Merge remote-tracking branch 'origin/develop' into xap
This commit is contained in:
commit
5f02fb99ca
82 changed files with 402 additions and 402 deletions
|
|
@ -20,11 +20,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
|
||||
bool led_update_user(led_t led_state) {
|
||||
if (led_state.caps_lock) {
|
||||
setPinOutput(B2);
|
||||
writePinLow(B2);
|
||||
gpio_set_pin_output(B2);
|
||||
gpio_write_pin_low(B2);
|
||||
} else {
|
||||
setPinInput(B2);
|
||||
writePinLow(B2);
|
||||
gpio_set_pin_input(B2);
|
||||
gpio_write_pin_low(B2);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,11 +20,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
|
||||
bool led_update_user(led_t led_state) {
|
||||
if (led_state.caps_lock) {
|
||||
setPinOutput(B2);
|
||||
writePinLow(B2);
|
||||
gpio_set_pin_output(B2);
|
||||
gpio_write_pin_low(B2);
|
||||
} else {
|
||||
setPinInput(B2);
|
||||
writePinLow(B2);
|
||||
gpio_set_pin_input(B2);
|
||||
gpio_write_pin_low(B2);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,11 +20,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
|
||||
bool led_update_user(led_t led_state) {
|
||||
if (led_state.caps_lock) {
|
||||
setPinOutput(B2);
|
||||
writePinLow(B2);
|
||||
gpio_set_pin_output(B2);
|
||||
gpio_write_pin_low(B2);
|
||||
} else {
|
||||
setPinInput(B2);
|
||||
writePinLow(B2);
|
||||
gpio_set_pin_input(B2);
|
||||
gpio_write_pin_low(B2);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,9 +90,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
|
||||
//function for layer indicator LED
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
writePin(D0, layer_state_cmp(state, 0));
|
||||
writePin(D1, layer_state_cmp(state, 1));
|
||||
writePin(D2, layer_state_cmp(state, 2));
|
||||
gpio_write_pin(D0, layer_state_cmp(state, 0));
|
||||
gpio_write_pin(D1, layer_state_cmp(state, 1));
|
||||
gpio_write_pin(D2, layer_state_cmp(state, 2));
|
||||
return state;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -90,9 +90,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
|
||||
//function for layer indicator LED
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
writePin(D0, layer_state_cmp(state, 0));
|
||||
writePin(D1, layer_state_cmp(state, 1));
|
||||
writePin(D2, layer_state_cmp(state, 2));
|
||||
gpio_write_pin(D0, layer_state_cmp(state, 0));
|
||||
gpio_write_pin(D1, layer_state_cmp(state, 1));
|
||||
gpio_write_pin(D2, layer_state_cmp(state, 2));
|
||||
return state;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
|
||||
/* Layer-specific lighting */
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
writePin(F4, !layer_state_cmp(state, _VC));
|
||||
writePin(F5, !layer_state_cmp(state, _VIM));
|
||||
gpio_write_pin(F4, !layer_state_cmp(state, _VC));
|
||||
gpio_write_pin(F5, !layer_state_cmp(state, _VIM));
|
||||
return state;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
};
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
writePin(D0, IS_LAYER_ON_STATE(state, 1));
|
||||
gpio_write_pin(D0, IS_LAYER_ON_STATE(state, 1));
|
||||
|
||||
return state;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,11 +46,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
// C6 E6 D7
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
writePin(C6, layer_state_is(1));
|
||||
writePin(E6, layer_state_is(2));
|
||||
writePin(D7, layer_state_is(3));
|
||||
writePin(D4, layer_state_is(4));
|
||||
writePin(D0, layer_state_is(5));
|
||||
gpio_write_pin(C6, layer_state_is(1));
|
||||
gpio_write_pin(E6, layer_state_is(2));
|
||||
gpio_write_pin(D7, layer_state_is(3));
|
||||
gpio_write_pin(D4, layer_state_is(4));
|
||||
gpio_write_pin(D0, layer_state_is(5));
|
||||
if (is_alt_tab_active) {
|
||||
if (timer_elapsed(alt_tab_timer) > 1000) {
|
||||
unregister_code(KC_LWIN);
|
||||
|
|
|
|||
|
|
@ -47,15 +47,15 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
setPinOutput(B0);
|
||||
writePinLow(B0);
|
||||
gpio_set_pin_output(B0);
|
||||
gpio_write_pin_low(B0);
|
||||
}
|
||||
|
||||
bool led_update_user(led_t led_state) {
|
||||
if (led_state.caps_lock) {
|
||||
writePinHigh(B0);
|
||||
gpio_write_pin_high(B0);
|
||||
} else {
|
||||
writePinLow(B0);
|
||||
gpio_write_pin_low(B0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
void matrix_scan_user(void) {
|
||||
// escape LED on layer 1
|
||||
if (IS_LAYER_ON(1)) {
|
||||
writePinLow(B0);
|
||||
gpio_write_pin_low(B0);
|
||||
} else {
|
||||
writePinHigh(B0);
|
||||
gpio_write_pin_high(B0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,6 +73,6 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
|
|||
#endif
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
writePin(C0, layer_state_cmp(state, 1));
|
||||
gpio_write_pin(C0, layer_state_cmp(state, 1));
|
||||
return state;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -73,6 +73,6 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
|
|||
#endif
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
writePin(C0, layer_state_cmp(state, 1));
|
||||
gpio_write_pin(C0, layer_state_cmp(state, 1));
|
||||
return state;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -64,6 +64,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
};
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
writePin(C0, layer_state_cmp(state, 1));
|
||||
gpio_write_pin(C0, layer_state_cmp(state, 1));
|
||||
return state;
|
||||
};
|
||||
|
|
@ -64,6 +64,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
};
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
writePin(C0, layer_state_cmp(state, 1));
|
||||
gpio_write_pin(C0, layer_state_cmp(state, 1));
|
||||
return state;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -51,10 +51,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
bool led_update_user(led_t led_state) {
|
||||
if (led_state.caps_lock) {
|
||||
rgblight_sethsv(HSV_CYAN);
|
||||
writePinHigh(D1);
|
||||
gpio_write_pin_high(D1);
|
||||
} else {
|
||||
rgblight_sethsv(HSV_GREEN);
|
||||
writePinLow(D1);
|
||||
gpio_write_pin_low(D1);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -215,18 +215,18 @@ led_config_t led_config;
|
|||
//Set leds to saved state during powerup
|
||||
void keyboard_post_init_user(void) {
|
||||
// set LED pin modes
|
||||
setPinOutput(LED_RED);
|
||||
setPinOutput(LED_GREEN);
|
||||
gpio_set_pin_output(LED_RED);
|
||||
gpio_set_pin_output(LED_GREEN);
|
||||
|
||||
// Call the post init code.
|
||||
led_config.raw = eeconfig_read_user();
|
||||
|
||||
if(led_config.red_mode == LEDMODE_ON) {
|
||||
writePinHigh(LED_RED);
|
||||
gpio_write_pin_high(LED_RED);
|
||||
}
|
||||
|
||||
if(led_config.green_mode == LEDMODE_ON) {
|
||||
writePinHigh(LED_GREEN);
|
||||
gpio_write_pin_high(LED_GREEN);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -248,10 +248,10 @@ void led_keypress_update(uint8_t led, uint8_t led_mode, uint16_t keycode, keyrec
|
|||
for (int i=0;i<ARRAY_SIZE(modifiers);i++) {
|
||||
if(keycode==modifiers[i]) {
|
||||
if (record->event.pressed) {
|
||||
writePinHigh(led);
|
||||
gpio_write_pin_high(led);
|
||||
}
|
||||
else {
|
||||
writePinLow(led);
|
||||
gpio_write_pin_low(led);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -260,30 +260,30 @@ void led_keypress_update(uint8_t led, uint8_t led_mode, uint16_t keycode, keyrec
|
|||
if (record->event.pressed) {
|
||||
if(rand() % 2 == 1) {
|
||||
if(rand() % 2 == 0) {
|
||||
writePinLow(led);
|
||||
gpio_write_pin_low(led);
|
||||
}
|
||||
else {
|
||||
writePinHigh(led);
|
||||
gpio_write_pin_high(led);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case LEDMODE_KEY:
|
||||
if (record->event.pressed) {
|
||||
writePinHigh(led);
|
||||
gpio_write_pin_high(led);
|
||||
return;
|
||||
}
|
||||
else {
|
||||
writePinLow(led);
|
||||
gpio_write_pin_low(led);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case LEDMODE_ENTER:
|
||||
if (keycode==KC_ENT) {
|
||||
writePinHigh(led);
|
||||
gpio_write_pin_high(led);
|
||||
}
|
||||
else {
|
||||
writePinLow(led);
|
||||
gpio_write_pin_low(led);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -345,11 +345,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
if (record->event.pressed) {
|
||||
if (led_config.red_mode==LEDMODE_ON) {
|
||||
led_config.red_mode=LEDMODE_OFF;
|
||||
writePinLow(LED_RED);
|
||||
gpio_write_pin_low(LED_RED);
|
||||
}
|
||||
else {
|
||||
led_config.red_mode=LEDMODE_ON;
|
||||
writePinHigh(LED_RED);
|
||||
gpio_write_pin_high(LED_RED);
|
||||
}
|
||||
}
|
||||
eeconfig_update_user(led_config.raw);
|
||||
|
|
@ -359,11 +359,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
if (record->event.pressed) {
|
||||
if (led_config.green_mode==LEDMODE_ON) {
|
||||
led_config.green_mode=LEDMODE_OFF;
|
||||
writePinLow(LED_GREEN);
|
||||
gpio_write_pin_low(LED_GREEN);
|
||||
}
|
||||
else {
|
||||
led_config.green_mode=LEDMODE_ON;
|
||||
writePinHigh(LED_GREEN);
|
||||
gpio_write_pin_high(LED_GREEN);
|
||||
}
|
||||
}
|
||||
eeconfig_update_user(led_config.raw);
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
|
||||
};
|
||||
bool led_update_user(led_t led_state) {
|
||||
writePin(LED_RED, led_state.caps_lock);
|
||||
writePin(LED_GREEN, led_state.scroll_lock);
|
||||
gpio_write_pin(LED_RED, led_state.caps_lock);
|
||||
gpio_write_pin(LED_GREEN, led_state.scroll_lock);
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,6 +66,6 @@ bool rgb_matrix_indicators_user(void) {
|
|||
}
|
||||
|
||||
void keyboard_pre_init_user(void) {
|
||||
setPinOutput(B5);
|
||||
writePinLow(B5);
|
||||
gpio_set_pin_output(B5);
|
||||
gpio_write_pin_low(B5);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,9 +48,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
if (get_highest_layer(state) != 0) {
|
||||
writePinLow(C6);
|
||||
gpio_write_pin_low(C6);
|
||||
} else {
|
||||
writePinHigh(C6);
|
||||
gpio_write_pin_high(C6);
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,9 +48,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
if (get_highest_layer(state) != 0) {
|
||||
writePinLow(C6);
|
||||
gpio_write_pin_low(C6);
|
||||
} else {
|
||||
writePinHigh(C6);
|
||||
gpio_write_pin_high(C6);
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue