]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1_FreedomStudio/freedom-metal/src/drivers/sifive_test0.c
Update RISCC-V-RV32-SiFive_HiFive1_FreedomStudio project to latest tools and metal...
[freertos] / FreeRTOS / Demo / RISC-V_RV32_SiFive_HiFive1_FreedomStudio / freedom-metal / src / drivers / sifive_test0.c
index 4ef0aa86170a1bfae9c1d2cfe88f605686a31aba..79deebbf5b9ea1162356b82d4b9950492f879542 100644 (file)
@@ -5,15 +5,17 @@
 
 #ifdef METAL_SIFIVE_TEST0
 
+#include <metal/machine.h>
+
+#include <stdint.h>
+
 #include <metal/drivers/sifive_test0.h>
 #include <metal/io.h>
-#include <stdint.h>
-#include <metal/machine.h>
 
 void __metal_driver_sifive_test0_exit(const struct __metal_shutdown *sd, int code) __attribute__((noreturn));
 void __metal_driver_sifive_test0_exit(const struct __metal_shutdown *sd, int code)
 {
-    long base = __metal_driver_sifive_test0_base();
+    long base = __metal_driver_sifive_test0_base(sd);
     uint32_t out = (code << 16) + (code == 0 ? 0x5555 : 0x3333);
     while (1) {
         __METAL_ACCESS_ONCE((__metal_io_u32 *)(base + METAL_SIFIVE_TEST0_FINISHER_OFFSET)) = out;
@@ -24,3 +26,5 @@ __METAL_DEFINE_VTABLE(__metal_driver_vtable_sifive_test0) = {
     .shutdown.exit       = &__metal_driver_sifive_test0_exit,
 };
 #endif /* METAL_SIFIVE_TEST0 */
+
+typedef int no_empty_translation_units;