Browse Source

bug correction when using pin polarity to drive their activation

Vincent-FK 4 years ago
parent
commit
83f4758c24
2 changed files with 4 additions and 4 deletions
  1. 2 2
      funkey_gpio_mapping.conf
  2. 2 2
      gpio_mapping.c

+ 2 - 2
funkey_gpio_mapping.conf

@@ -51,8 +51,8 @@
 7+13, KEYBOARD, KEY_W, KEY_W, Brightness--
 11, KEYBOARD, KEY_Y, KEY_Y, Y
 7+11, KEYBOARD, KEY_C, KEY_C, Volume++
-#10, SHELL_COMMAND, poweroff, N_OE, Poweroff because N_OE_received
-10, KEYBOARD, KEY_T, KEY_T, Should Poweroff because N_OE_received
+10, SHELL_COMMAND, poweroff, N_OE, Poweroff because N_OE_received
+#10, KEYBOARD, KEY_T, KEY_T, Should Poweroff because N_OE_received
 
 # Bypass to remove when button axp working:
 #7+15, KEYBOARD, KEY_Q, 7+11, Launch menu

+ 2 - 2
gpio_mapping.c

@@ -148,8 +148,8 @@ static void find_and_call_mapping_function(int idx_gpio_interrupted,
 				gpio_found_pin_in_mapping = true;
 			}
 
-			// Check if all other pins of current mapping were already activated in previous mask
-			if(!mask_gpio_values[current->pins_idx[i]]){
+			// Check if all other pins of current mapping are activated or were already activated in previous mask
+			if(!mask_gpio_values[current->pins_idx[i]] && gpios_pins_active_high[current->pins_idx[i]]){
 				all_gpio_activated_in_mapping = false;
 			}
 		}