Переглянути джерело

Temp disable buttons on older hw

Eric Helgeson 4 місяців тому
батько
коміт
204e4679bc
1 змінених файлів з 9 додано та 8 видалено
  1. 9 8
      lib/BlueSCSI_platform_RP2MCU/BlueSCSI_platform.cpp

+ 9 - 8
lib/BlueSCSI_platform_RP2MCU/BlueSCSI_platform.cpp

@@ -280,9 +280,9 @@ bool checkIs2023a() {
         dbgmsg("I2C not supported on this rev of hardware");
         /* Check option switch settings */
         // Option switches: S1 is iATN, S2 is iACK
-        gpio_conf(BUTTON_SW1_PRE202309a,    GPIO_FUNC_SIO, true, false, false, false, false);
-        gpio_conf(BUTTON_SW1_PRE202309a,    GPIO_FUNC_SIO, false, false, false, false, false);
-        delay(10); /// Settle time
+        // gpio_conf(BUTTON_SW1_PRE202309a,    GPIO_FUNC_SIO, true, false, false, false, false);
+        // gpio_conf(BUTTON_SW1_PRE202309a,    GPIO_FUNC_SIO, false, false, false, false, false);
+        // delay(10); /// Settle time
 
         // Reset REQ to the appropriate pin for older hardware
         SCSI_OUT_REQ = SCSI_OUT_REQ_PRE09A;
@@ -1118,10 +1118,10 @@ uint8_t platform_get_buttons()
     // if (!gpio_get(GPIO_I2C_SCL)) buttons |= 2;
 #endif // defined(ENABLE_AUDIO_OUTPUT_SPDIF)
 
-    if (!is2023a) {
-        if (!gpio_get(BUTTON_SW1_PRE202309a)) buttons |= 1;
-        if (!gpio_get(BUTTON_SW2_PRE202309a)) buttons |= 2;
-    }
+    // if (!is2023a) {
+    //     if (!gpio_get(BUTTON_SW1_PRE202309a)) buttons |= 1;
+    //     if (!gpio_get(BUTTON_SW2_PRE202309a)) buttons |= 2;
+    // }
     // Simple debouncing logic: handle button releases after 100 ms delay.
     static uint32_t debounce;
     static uint8_t buttons_debounced = 0;
@@ -1141,8 +1141,9 @@ uint8_t platform_get_buttons()
 
 bool platform_has_phy_eject_button()
 {
+    return false;
     // 2023a and later boards have i2c buttons
-    return !is2023a;
+    // return !is2023a;
 }
 
 /************************************/