neutrino: add support for the SPARK frontpanel buttons

This commit is contained in:
Stefan Seyfried
2012-03-19 19:42:19 +01:00
parent 9221807a7c
commit 04ba38f14f
2 changed files with 12 additions and 1 deletions

View File

@@ -61,8 +61,13 @@
#include <neutrino.h> #include <neutrino.h>
#include <cs_api.h> #include <cs_api.h>
//const char * const RC_EVENT_DEVICE[NUMBER_OF_EVENT_DEVICES] = {"/dev/input/nevis_ir", "/dev/input/event0"}; #if HAVE_SPARK_HARDWARE
/* this relies on event0 being the AOTOM frontpanel driver device
* TODO: what if another input device is present? */
const char * const RC_EVENT_DEVICE[NUMBER_OF_EVENT_DEVICES] = {"/dev/input/nevis_ir", "/dev/input/event0"};
#else
const char * const RC_EVENT_DEVICE[NUMBER_OF_EVENT_DEVICES] = {"/dev/input/nevis_ir"}; const char * const RC_EVENT_DEVICE[NUMBER_OF_EVENT_DEVICES] = {"/dev/input/nevis_ir"};
#endif
typedef struct input_event t_input_event; typedef struct input_event t_input_event;
#ifdef KEYBOARD_INSTEAD_OF_REMOTE_CONTROL #ifdef KEYBOARD_INSTEAD_OF_REMOTE_CONTROL
@@ -1155,6 +1160,8 @@ printf("[neutrino] CSectionsdClient::EVT_GOT_CN_EPG\n");
if(ret != sizeof(t_input_event)) if(ret != sizeof(t_input_event))
continue; continue;
if (ev.type == EV_SYN)
continue; /* ignore... */
SHTDCNT::getInstance()->resetSleepTimer(); SHTDCNT::getInstance()->resetSleepTimer();
uint32_t trkey = translate(ev.code, i); uint32_t trkey = translate(ev.code, i);
#ifdef _DEBUG #ifdef _DEBUG

View File

@@ -137,7 +137,11 @@ class CRCInput
int fd_pipe_high_priority[2]; int fd_pipe_high_priority[2];
int fd_pipe_low_priority[2]; int fd_pipe_low_priority[2];
int fd_gamerc; int fd_gamerc;
#ifdef HAVE_SPARK_HARDWARE
#define NUMBER_OF_EVENT_DEVICES 2
#else
#define NUMBER_OF_EVENT_DEVICES 1 #define NUMBER_OF_EVENT_DEVICES 1
#endif
int fd_rc[NUMBER_OF_EVENT_DEVICES]; int fd_rc[NUMBER_OF_EVENT_DEVICES];
int fd_keyb; int fd_keyb;
int fd_event; int fd_event;