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:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user