Pārlūkot izejas kodu

GD32F4: Update and rebase to newest main branch

Petteri Aimonen 2 gadi atpakaļ
vecāks
revīzija
1f509b36dd

+ 6 - 0
lib/ZuluSCSI_platform_GD32F450/ZuluSCSI_platform.cpp

@@ -258,6 +258,12 @@ void azplatform_late_init()
     }
 }
 
+void azplatform_disable_led(void)
+{
+    gpio_mode_set(LED_PORT, GPIO_MODE_INPUT, GPIO_PUPD_NONE, LED_PINS);
+    azlog("Disabling status LED");
+}
+
 /*****************************************/
 /* Crash handlers                        */
 /*****************************************/

+ 3 - 0
lib/ZuluSCSI_platform_GD32F450/ZuluSCSI_platform.h

@@ -57,6 +57,9 @@ void azplatform_init();
 // Initialization for main application, not used for bootloader
 void azplatform_late_init();
 
+// Disable the status LED
+void azplatform_disable_led(void);
+
 // Setup soft watchdog
 void azplatform_reset_watchdog();
 

+ 11 - 1
lib/ZuluSCSI_platform_GD32F450/sd_card_sdio.cpp

@@ -121,7 +121,7 @@ uint32_t SdioCard::sectorCount()
 {
     csd_t csd;
     sd_csd_get((uint8_t*)&csd);
-    return sdCardCapacity(&csd);
+    return csd.capacity();
 }
 
 uint32_t SdioCard::status()
@@ -202,6 +202,16 @@ bool SdioCard::erase(uint32_t firstSector, uint32_t lastSector)
     return checkReturnOk(sd_erase(firstSector * 512, lastSector * 512));
 }
 
+bool SdioCard::cardCMD6(uint32_t arg, uint8_t* status) {
+    azlog("SdioCard::cardCMD6() not implemented");
+    return false;
+}
+
+bool SdioCard::readSCR(scr_t* scr) {
+    azlog("SdioCard::readSCR() not implemented");
+    return false;
+}
+
 /* Writing and reading, with progress callback */
 
 static sd_callback_t m_stream_callback;