Updated panicf in remove_event. Also fixed some comments.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17265 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
c5cd69e542
commit
f4eb0ee53c
2 changed files with 4 additions and 4 deletions
|
@ -33,7 +33,7 @@ bool add_event(unsigned short id, bool oneshot, void (*handler))
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* Chcek if the event already exists. */
|
/* Check if the event already exists. */
|
||||||
for (i = 0; i < MAX_SYS_EVENTS; i++)
|
for (i = 0; i < MAX_SYS_EVENTS; i++)
|
||||||
{
|
{
|
||||||
if (events[i].callback == handler && events[i].id == id)
|
if (events[i].callback == handler && events[i].id == id)
|
||||||
|
@ -69,7 +69,7 @@ void remove_event(unsigned short id, void (*handler))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
panicf("event not found");
|
panicf("event %d not found", (int)id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void send_event(unsigned short id, void *data)
|
void send_event(unsigned short id, void *data)
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
#define MAX_SYS_EVENTS 10
|
#define MAX_SYS_EVENTS 10
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* High nibble = Event class definition
|
* High byte = Event class definition
|
||||||
* Low nibble = Event ID
|
* Low byte = Event ID
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define EVENT_CLASS_DISK 0x0100
|
#define EVENT_CLASS_DISK 0x0100
|
||||||
|
|
Loading…
Reference in a new issue