neutrino: change all remote/frontpanel stuff to use the new headers.

This commit is contained in:
S.R. van Loon
2012-09-25 22:23:17 +08:00
parent cf878686ba
commit 83636ebb6e
5 changed files with 16 additions and 16 deletions

View File

@@ -118,7 +118,8 @@ AC_ARG_ENABLE(cleanup,
[ --enable-cleanup enable cleanup on exit],
[AC_DEFINE(EXIT_CLEANUP,1,[enable cleanup on exit])])
AC_CHECK_HEADERS(coolstream/nevis_ir.h)
AC_CHECK_HEADERS(coolstream/cs_ir_generic.h)
AC_CHECK_HEADERS(coolstream/cs_frontpanel.h)
#
# Check for libtdservicedb - the new one - for testing only

View File

@@ -65,8 +65,7 @@
#define ENABLE_REPEAT_CHECK
//const char * const RC_EVENT_DEVICE[NUMBER_OF_EVENT_DEVICES] = {"/dev/input/nevis_ir", "/dev/input/event0"};
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/cs_ir"};
typedef struct input_event t_input_event;
#ifdef KEYBOARD_INSTEAD_OF_REMOTE_CONTROL
@@ -1571,8 +1570,8 @@ void CRCInput::play_click()
}
#ifdef HAVE_COOLSTREAM_NEVIS_IR_H
// hint: ir_protocol_t and other useful things are defined in nevis_ir.h
#ifdef HAVE_COOLSTREAM_CS_IR_GENERIC_H
// hint: ir_protocol_t and other useful things are defined in cs_ir_generic.h
void CRCInput::set_rc_hw(ir_protocol_t ir_protocol, unsigned int ir_address)
{
int ioctl_ret = -1;
@@ -1596,7 +1595,7 @@ void CRCInput::set_rc_hw(ir_protocol_t ir_protocol, unsigned int ir_address)
}
}
// hint: ir_protocol_t and other useful things are defined in nevis_ir.h
// hint: ir_protocol_t and other useful things are defined in cs_ir_generic.h
void CRCInput::set_rc_hw(void)
{
ir_protocol_t ir_protocol = IR_PROTOCOL_UNKNOWN;

View File

@@ -38,8 +38,8 @@
#include <sys/types.h>
#include <string>
#include <vector>
#ifdef HAVE_COOLSTREAM_NEVIS_IR_H
#include <coolstream/nevis_ir.h>
#ifdef HAVE_COOLSTREAM_CS_IR_GENERIC_H
#include <coolstream/cs_ir_generic.h>
#endif
#ifndef KEY_OK
@@ -152,7 +152,7 @@ class CRCInput
int translate(int code, int num);
void calculateMaxFd(void);
int checkTimers();
#ifdef HAVE_COOLSTREAM_NEVIS_IR_H
#ifdef HAVE_COOLSTREAM_CS_IR_GENERIC_H
void set_rc_hw(ir_protocol_t ir_protocol, unsigned int ir_address);
#endif
public:

View File

@@ -33,7 +33,7 @@
#include <config.h>
#endif
#ifdef HAVE_COOLSTREAM_NEVIS_IR_H
#ifdef HAVE_COOLSTREAM_CS_IR_GENERIC_H
/* define constants instead of #ifdef'ing the corresponding code.
* the compiler will optimize it away anyway, but the syntax is
* still checked */
@@ -41,7 +41,7 @@
#else
#define RC_HW_SELECT false
#ifdef HAVE_COOL_HARDWARE
#warning header coolstream/nevis_ir.h not found
#warning header coolstream/cs_ir_generic.h not found
#warning you probably have an old driver installation
#warning you´ll be missing the remotecontrol selection feature!
#endif

View File

@@ -33,8 +33,8 @@
#include <timerdclient/timerdclient.h>
#include <timerdclient/timerdmsg.h>
#include <sectionsdclient/sectionsdclient.h>
#if HAVE_COOL_HARDWARE
#include <coolstream/cs_vfd.h>
#ifdef HAVE_COOLSTREAM_CS_FRONTPANEL_H
#include <coolstream/cs_frontpanel.h>
#endif
#include <vector>
@@ -79,11 +79,11 @@ void CTimerManager::Init(void)
if (fd < 0) {
perror("/dev/display");
} else {
wakeup_data_t wk;
fp_wakeup_data_t wk;
memset(&wk, 0, sizeof(wk));
int ret = ioctl(fd, IOC_VFD_GET_WAKEUP, &wk);
int ret = ioctl(fd, IOC_FP_GET_WAKEUP, &wk);
if(ret >= 0)
wakeup = ((wk.source == WAKEUP_SOURCE_TIMER) /* || (wk.source == WAKEUP_SOURCE_PWLOST)*/);
wakeup = ((wk.source == FP_WAKEUP_SOURCE_TIMER) /* || (wk.source == WAKEUP_SOURCE_PWLOST)*/);
close(fd);
}
printf("[timerd] wakeup from standby: %s\n", wakeup ? "yes" : "no");