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

working lcd log with panic

This commit is contained in:
Bas Wijnen
2009-07-24 14:25:53 +02:00
parent 592713adec
commit b7d9b1554c
11 changed files with 116 additions and 139 deletions

View File

@@ -262,8 +262,7 @@ class Pwm:
// TODO: make it really work as a pwm instead of a switch; check if pwm1 is connected to anything.
int main ():
for unsigned i = 0; i < 10; ++i:
schedule ()
schedule ()
*(unsigned *)~3 = 0
map_gpio ()

View File

@@ -67,20 +67,23 @@ static void setup ():
invoke_01 (pwm, 1)
int main ():
for unsigned i = 0; i < 10; ++i:
schedule ()
setup ()
schedule ()
kdebug ("start init")
setup ()
kdebug ("run init")
while true:
Message msg
wait (&msg)
switch msg.protected_data:
case KBD:
invoke_01 (lockleds, 0x4 | (msg.data[0] >> 16))
kdebug ("keyboard event")
break
case TP:
invoke_01 (lockleds, 0x2 | (msg.data[0] >> 16))
kdebug ("touchpad event")
break
case POWERBUTTON:
case BATTERY:
kdebug ("powerbutton event")
break
case BATTERY:
kdebug ("battery event")
break

View File

@@ -106,7 +106,7 @@ static void log_num (unsigned n):
char const *encode = "0123456789abcdef"
log_char ('[')
for unsigned i = 0; i < 8; ++i:
log_char (encode[(n >> (7 - i)) & 0xf])
log_char (encode[(n >> (4 * (7 - i))) & 0xf])
log_char (']')
static void log_msg (Message *msg):