26 #ifdef HAVE_KERNEL_LIRC_H 27 #include <linux/lirc.h> 29 #include "media/lirc.h" 32 #include "lirc/ir_remote_types.h" 33 #include "lirc/curl_poll.h" 36 #define MAXPATHLEN 4096 40 #define HAVE_SERVER_VERSION 1 51 #define DRV_ERR_NOT_IMPLEMENTED 1 76 #define DRVCTL_GET_STATE 1 79 #define DRVCTL_SEND_SPACE 2 82 #define DRVCTL_SET_OPTION 3 88 #define DRVCTL_GET_RAW_CODELENGTH 4 99 #define DRVCTL_GET_DEVICES 5 102 #define DRVCTL_FREE_DEVICES 6 109 #define DRVCTL_NOTIFY_DECODE 7 112 #define DRVCTL_MAX 128 115 #define DRV_ERR_NOT_IMPLEMENTED 1 118 #define DRV_ERR_BAD_STATE 2 121 #define DRV_ERR_BAD_OPTION 3 124 #define DRV_ERR_BAD_VALUE 4 127 #define DRV_ERR_ENUM_EMPTY 5 130 #define DRV_ERR_INTERNAL 6 172 int (*
const open_func) (
const char* device);
178 int (*
const init_func)(void);
184 int (*
const deinit_func) (void);
213 int (*
const drvctl_func)(
unsigned int cmd,
void* arg);
222 lirc_t (*
const readdata)(lirc_t timeout);
242 int (*
const close_func)(void);
One remote as represented in the configuration file.
Argument for DRV_SET_OPTION.
int default_close(void)
For now, a placeholder.
int fd
Set by the driver after init().
const char * info
Free text driver info.
const struct driver *const curr_driver
Read-only access to drv for application.
unsigned int resolution
The resolution in microseconds of the recorded durations when reading signals.
uint32_t rec_mode
Possible values are: LIRC_MODE_RAW, LIRC_MODE_PULSE, LIRC_MODE_MODE2, LIRC_MODE_LIRCCODE.
struct driver drv
The global driver data that drivers etc are accessing.
const char * driver_version
Driver version (free text).
const int api_version
API version (from version 2+).
char *(*const rec_func)(struct ir_remote *remotes)
Receive data from remote.
uint32_t features
Code for the features of the present device, valid after init().
int default_drvctl(unsigned int cmd, void *arg)
Return DRV_ERR_NOTIMPLEMENTED.
uint32_t send_mode
Possible values are: LIRC_MODE_RAW, LIRC_MODE_PULSE, LIRC_MODE_MODE2, LIRC_MODE_LIRCCODE.
The data the driver exports i.
IR Command, corresponding to one (command defining) line of the configuration file.
const uint32_t code_length
Length in bits of the code.
State describing code, pre, post + gap and repeat state.
int drv_handle_options(const char *options)
Parse an option string "key:value;key:value..." and invoke drvctl DRV_SET_OPTION as appropriate...
const char *const device_hint
device_hint is a mean for config tools to autodetect devices.
const char * name
Driver name, as listed by -H help and used as argument to i –driver.
int default_open(const char *path)
Stores path in drv.device if non-null.
ir_code code
The first code of the command.
int get_server_version(void)
Return numeric server version, m.v.r => 10000 * m + 100 * v + r.
const char * device
Name of the device (string).