Sfoglia il codice sorgente

Detect DynaPORT on SCSI bus on boot

For some reason the LED needs to be disabled for the DynaPORT to be
detected once Mac OS boots.
Morio 2 anni fa
parent
commit
2857e1ca0e

+ 7 - 2
lib/ZuluSCSI_platform_RP2040/ZuluSCSI_platform_gpio_Pico.h

@@ -71,8 +71,13 @@
 
 // Status LED pins
 #define LED_PIN      16
-#define LED_ON()     sio_hw->gpio_set = 1 << LED_PIN
-#define LED_OFF()    sio_hw->gpio_clr = 1 << LED_PIN
+#ifdef ZULUSCSI_DAYNAPORT // disable LEDs, workaround to boot correctly
+# define LED_ON()    (void)0
+# define LED_OFF()   (void)0
+#else
+# define LED_ON()    sio_hw->gpio_set = 1 << LED_PIN
+# define LED_OFF()   sio_hw->gpio_clr = 1 << LED_PIN
+#endif
 
 // SD card pins in SDIO mode
 #define SDIO_CLK 10

+ 1 - 0
lib/ZuluSCSI_platform_RP2040/ZuluSCSI_platform_network.cpp

@@ -84,6 +84,7 @@ int platform_network_init(char *mac)
 		memcpy(scsiDev.boardCfg.wifiMACAddress, mac, sizeof(scsiDev.boardCfg.wifiMACAddress));
 	}
 
+	cyw43_init(&cyw43_state);
 	// setting the MAC requires libpico to be compiled with CYW43_USE_OTP_MAC=0
 	memcpy(cyw43_state.mac, mac, sizeof(cyw43_state.mac));
 	cyw43_arch_enable_sta_mode();

+ 0 - 1
platformio.ini

@@ -122,7 +122,6 @@ build_flags =
     -DHAS_SDIO_CLASS
     -DUSE_ARDUINO=1
     -DZULUSCSI_PICO
-    -DDISABLE_SWO
 
 [env:ZuluSCSI_Pico_Net_DaynaPORT]
 platform = https://github.com/maxgerhardt/platform-raspberrypi.git