]> mj.ucw.cz Git - home-hw.git/blobdiff - lib/util.h
burrow-bsbd: Removed surplus newline
[home-hw.git] / lib / util.h
index 6b9f4ba488dd94a54daab69a866ba7ce10253d2c..18e36524b422304b6ec1b0aa98e5bd0e8486dcc9 100644 (file)
@@ -85,11 +85,19 @@ static inline void wait_for_interrupt(void)
        asm volatile ("wfi");
 }
 
        asm volatile ("wfi");
 }
 
+// A compiler memory barrier
+
+static inline void barrier(void)
+{
+       asm volatile ("" : : : "memory");
+}
+
 // util-debug.c
 
 void debug_printf(const char *fmt, ...) __attribute__((format(printf,1,2)));
 void debug_puts(const char *s);
 void debug_putc(int c);
 // util-debug.c
 
 void debug_printf(const char *fmt, ...) __attribute__((format(printf,1,2)));
 void debug_puts(const char *s);
 void debug_putc(int c);
+void debug_flush(void);
 
 void debug_led(bool light);
 void debug_led_toggle(void);
 
 void debug_led(bool light);
 void debug_led_toggle(void);