aboutsummaryrefslogtreecommitdiff
path: root/keyboards/hhkb/yang/yang.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/hhkb/yang/yang.c')
-rw-r--r--keyboards/hhkb/yang/yang.c62
1 files changed, 31 insertions, 31 deletions
diff --git a/keyboards/hhkb/yang/yang.c b/keyboards/hhkb/yang/yang.c
index 548f0dd734..3aba711b1f 100644
--- a/keyboards/hhkb/yang/yang.c
+++ b/keyboards/hhkb/yang/yang.c
@@ -21,13 +21,13 @@ extern uint8_t power_save_level;
void hhkb_led_on(uint8_t led) {
switch (led) {
case 1:
- writePinHigh(F4);
+ gpio_write_pin_high(F4);
break;
case 2:
- writePinHigh(F2);
+ gpio_write_pin_high(F2);
break;
case 3:
- writePinHigh(F0);
+ gpio_write_pin_high(F0);
break;
}
}
@@ -35,55 +35,55 @@ void hhkb_led_on(uint8_t led) {
void hhkb_led_off(uint8_t led) {
switch (led) {
case 1:
- writePinLow(F4);
+ gpio_write_pin_low(F4);
break;
case 2:
- writePinLow(F2);
+ gpio_write_pin_low(F2);
break;
case 3:
- writePinLow(F0);
+ gpio_write_pin_low(F0);
break;
}
}
void keyboard_pre_init_kb(void) {
// BT power up
- setPinOutput(D5);
- writePinLow(D5);
+ gpio_set_pin_output(D5);
+ gpio_write_pin_low(D5);
// Row selectors
- setPinOutput(B0);
- setPinOutput(B1);
- setPinOutput(B2);
+ gpio_set_pin_output(B0);
+ gpio_set_pin_output(B1);
+ gpio_set_pin_output(B2);
// Col selectors
- setPinOutput(B3);
- setPinOutput(B4);
- setPinOutput(B5);
+ gpio_set_pin_output(B3);
+ gpio_set_pin_output(B4);
+ gpio_set_pin_output(B5);
// Key strobe
- setPinOutput(B6);
- writePinHigh(B6);
+ gpio_set_pin_output(B6);
+ gpio_write_pin_high(B6);
// Key: input with pull-up
- setPinInputHigh(D7);
+ gpio_set_pin_input_high(D7);
// Unused pins on Pro2 ANSI
// Input with pull up to save power
- setPinInputHigh(C6);
- setPinInputHigh(C7);
+ gpio_set_pin_input_high(C6);
+ gpio_set_pin_input_high(C7);
// LED pin configuration
- setPinOutput(F0);
- setPinOutput(F1);
- setPinOutput(F4);
- writePinLow(F0);
- writePinLow(F1);
- writePinLow(F4);
+ gpio_set_pin_output(F0);
+ gpio_set_pin_output(F1);
+ gpio_set_pin_output(F4);
+ gpio_write_pin_low(F0);
+ gpio_write_pin_low(F1);
+ gpio_write_pin_low(F4);
// Turn on switch PCB
- setPinOutput(D6);
- writePinLow(D6);
+ gpio_set_pin_output(D6);
+ gpio_write_pin_low(D6);
keyboard_pre_init_user();
}
@@ -93,7 +93,7 @@ void suspend_power_down_kb(void) {
// Disable UART TX to avoid current leakage
UCSR1B &= ~_BV(TXEN1);
// Power down BLE module
- writePinHigh(D5);
+ gpio_write_pin_high(D5);
}
suspend_power_down_user();
@@ -101,7 +101,7 @@ void suspend_power_down_kb(void) {
void suspend_wakeup_init_kb(void) {
// Power up BLE module
- writePinLow(D5);
+ gpio_write_pin_low(D5);
// Enable UART TX
UCSR1B |= _BV(TXEN1);
@@ -111,8 +111,8 @@ void suspend_wakeup_init_kb(void) {
layer_state_t layer_state_set_kb(layer_state_t state) {
state = layer_state_set_user(state);
- writePin(F1, IS_LAYER_ON_STATE(state, 1));
- writePin(F0, IS_LAYER_ON_STATE(state, 2));
+ gpio_write_pin(F1, IS_LAYER_ON_STATE(state, 1));
+ gpio_write_pin(F0, IS_LAYER_ON_STATE(state, 2));
return state;
}