diff options
Diffstat (limited to 'usb-i2c-sl018/eventqueue.c')
-rw-r--r-- | usb-i2c-sl018/eventqueue.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/usb-i2c-sl018/eventqueue.c b/usb-i2c-sl018/eventqueue.c index 53f60d5..305a823 100644 --- a/usb-i2c-sl018/eventqueue.c +++ b/usb-i2c-sl018/eventqueue.c @@ -44,3 +44,18 @@ void eventqueue_push(event_t event) RingBuffer_Insert(&event_queue,event); } +const char* event_to_string(event_t event) +{ + switch(event) { + case none: return "none"; + case cmd_open: return "cmd_open"; + case cmd_close: return "cmd_close"; + case cmd_toggle: return "cmd_toggle"; + case btn_toggle: return "btn_toggle"; + case card: return "card"; + case open_fin: return "open_fin"; + case close_fin: return "close_fin"; + case move_timeout: return "move_timeout"; + } + return "invalid"; // gcc - shut the fuck up!!! +} |