1
0
mirror of git://projects.qi-hardware.com/iris.git synced 2025-04-21 12:27:27 +03:00

make things work again

This commit is contained in:
Bas Wijnen
2015-11-19 01:06:57 -05:00
parent 2d803d5650
commit 10ea4a0725
8 changed files with 26 additions and 25 deletions

View File

@@ -359,6 +359,7 @@ namespace Iris:
write (encode[d])
num -= d * power
power /= base
#ifndef __NATIVE__
void printf (char const *f, ...):
unsigned *last = (unsigned *)&f
while *f:
@@ -393,6 +394,7 @@ namespace Iris:
else:
write (*f)
++f
#endif
// Numerical setting, such as a display backlight.
struct Setting : public Device:

View File

@@ -611,6 +611,7 @@ namespace Iris:
Iris::Num start ()
#ifndef __KERNEL__
#ifndef __NATIVE__
#if 1
// Use a define instead of an inline function, because this is better visible in disassembly, even when not optimizing.
#define kdebug_char(_c) do { unsigned _d = (_c); __asm__ volatile ("move $a0, $zero\nlw $a1, %0\nbreak" :: "m"(_d) : "a0", "a1", "memory"); } while (0)
@@ -684,6 +685,11 @@ namespace Iris:
else:
kdebug_char (*f)
++f
#endif
#else
namespace Iris:
inline void panic(unsigned code, char const *message = NULL):
inline void debug_num (unsigned num, unsigned base):
inline void debug (const char *f, ...):
#endif // !defined(__NATIVE__)
#endif // !defined(__KERNEL__)
#endif