mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +02:00
rcsim.c: use event dev on cst, too
This commit is contained in:
10
src/rcsim.c
10
src/rcsim.c
@@ -39,8 +39,10 @@
|
|||||||
/* if you want use HAVE_XX_HARDWARE, better include config.h :-) */
|
/* if you want use HAVE_XX_HARDWARE, better include config.h :-) */
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#ifdef HAVE_DBOX_HARDWARE
|
#if defined(HAVE_DBOX_HARDWARE)
|
||||||
#define EVENTDEV "/dev/input/event0"
|
#define EVENTDEV "/dev/input/event0"
|
||||||
|
#elif defined (HAVE_COOL_HARDWARE)
|
||||||
|
#define EVENTDEV "/dev/input/input0"
|
||||||
#else
|
#else
|
||||||
/* dreambox and tripledragon do not use a "normal" input device, so we cannot
|
/* dreambox and tripledragon do not use a "normal" input device, so we cannot
|
||||||
(ab-)use the event repeating function of it. use the neutrino socket instead. */
|
(ab-)use the event repeating function of it. use the neutrino socket instead. */
|
||||||
@@ -73,7 +75,7 @@ enum initiators
|
|||||||
void usage(char *n){
|
void usage(char *n){
|
||||||
unsigned int keynum = sizeof(keyname)/sizeof(struct key);
|
unsigned int keynum = sizeof(keyname)/sizeof(struct key);
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
#ifdef HAVE_DBOX_HARDWARE
|
#if defined (EVENTDEV)
|
||||||
printf ("rcsim v1.1\nUsage: %s <keyname> [<time>] [<repeat>]\n"
|
printf ("rcsim v1.1\nUsage: %s <keyname> [<time>] [<repeat>]\n"
|
||||||
" <keyname> is an excerpt of the 'KEY_FOO'-names in <driver/rcinput.h>,\n"
|
" <keyname> is an excerpt of the 'KEY_FOO'-names in <driver/rcinput.h>,\n"
|
||||||
" <time> is how long a code is repeatedly sent,\n"
|
" <time> is how long a code is repeatedly sent,\n"
|
||||||
@@ -102,7 +104,7 @@ void usage(char *n){
|
|||||||
|
|
||||||
/* we could also use the neutrino socket on the dbox, but this needs more testing.
|
/* we could also use the neutrino socket on the dbox, but this needs more testing.
|
||||||
so leave it as is for now */
|
so leave it as is for now */
|
||||||
#ifdef HAVE_DBOX_HARDWARE
|
#if defined (EVENTDEV)
|
||||||
int push(int ev, unsigned int code, unsigned int value)
|
int push(int ev, unsigned int code, unsigned int value)
|
||||||
{
|
{
|
||||||
struct input_event iev;
|
struct input_event iev;
|
||||||
@@ -214,7 +216,7 @@ int main (int argc, char **argv){
|
|||||||
rctime=(atol (argv[2])*1000)/reptime;
|
rctime=(atol (argv[2])*1000)/reptime;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_DBOX_HARDWARE
|
#if defined (EVENTDEV)
|
||||||
evd=open (EVENTDEV,O_RDWR);
|
evd=open (EVENTDEV,O_RDWR);
|
||||||
if (evd<0){
|
if (evd<0){
|
||||||
perror ("opening event0 failed");
|
perror ("opening event0 failed");
|
||||||
|
Reference in New Issue
Block a user