Ver Fonte

Add new platform code for GD32F450

Morio há 2 anos atrás
pai
commit
8ca64e7448

+ 6 - 0
lib/ZuluSCSI_platform_GD32F450/ZuluSCSI_platform.cpp

@@ -554,6 +554,12 @@ void platform_poll()
     usb_log_poll();
 }
 
+uint8_t platform_get_buttons()
+{
+    return 0;
+}
+
+
 /***********************/
 /* Flash reprogramming */
 /***********************/

+ 7 - 0
lib/ZuluSCSI_platform_GD32F450/ZuluSCSI_platform.h

@@ -96,6 +96,13 @@ void platform_reset_watchdog();
 // few milliseconds shouldn't disturb SCSI communication.
 void platform_poll();
 
+// Returns the state of any platform-specific buttons.
+// The returned value should be a mask for buttons 1-8 in bits 0-7 respectively,
+// where '1' is a button pressed and '0' is a button released.
+// Debouncing logic is left up to the specific implementation.
+// This function should return without significantly delay.
+uint8_t platform_get_buttons();
+
 // Reinitialize SD card connection and save log from interrupt context.
 // This can be used in crash handlers.
 void platform_emergency_log_save();