Skip to content
This repository was archived by the owner on Apr 28, 2021. It is now read-only.

Commit 83f4758

Browse files
committed
bug correction when using pin polarity to drive their activation
1 parent 8ce9724 commit 83f4758

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

funkey_gpio_mapping.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151
7+13, KEYBOARD, KEY_W, KEY_W, Brightness--
5252
11, KEYBOARD, KEY_Y, KEY_Y, Y
5353
7+11, KEYBOARD, KEY_C, KEY_C, Volume++
54-
#10, SHELL_COMMAND, poweroff, N_OE, Poweroff because N_OE_received
55-
10, KEYBOARD, KEY_T, KEY_T, Should Poweroff because N_OE_received
54+
10, SHELL_COMMAND, poweroff, N_OE, Poweroff because N_OE_received
55+
#10, KEYBOARD, KEY_T, KEY_T, Should Poweroff because N_OE_received
5656

5757
# Bypass to remove when button axp working:
5858
#7+15, KEYBOARD, KEY_Q, 7+11, Launch menu

gpio_mapping.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ static void find_and_call_mapping_function(int idx_gpio_interrupted,
148148
gpio_found_pin_in_mapping = true;
149149
}
150150

151-
// Check if all other pins of current mapping were already activated in previous mask
152-
if(!mask_gpio_values[current->pins_idx[i]]){
151+
// Check if all other pins of current mapping are activated or were already activated in previous mask
152+
if(!mask_gpio_values[current->pins_idx[i]] && gpios_pins_active_high[current->pins_idx[i]]){
153153
all_gpio_activated_in_mapping = false;
154154
}
155155
}

0 commit comments

Comments
 (0)