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
struct driver drv
The global driver data that drivers etc are accessing.
const struct driver *const curr_driver
Read-only access to drv for application.
int default_close(void)
For now, a placeholder.
int get_server_version(void)
Return numeric server version, m.v.r => 10000 * m + 100 * v + r.
int default_drvctl(unsigned int cmd, void *arg)
Return DRV_ERR_NOTIMPLEMENTED.
int drv_handle_options(const char *options)
Parse an option string "key:value;key:value..." and invoke drvctl DRV_SET_OPTION as appropriate.
int default_open(const char *path)
Stores path in drv.device if non-null.
State describing code, pre, post + gap and repeat state.
The data the driver exports i.
const int api_version
API version (from version 2+).
int fd
Set by the driver after init().
const char * driver_version
Driver version (free text).
const char * name
Driver name, as listed by -H help and used as argument to i –driver.
uint32_t send_mode
Possible values are: LIRC_MODE_RAW, LIRC_MODE_PULSE, LIRC_MODE_MODE2, LIRC_MODE_LIRCCODE.
const uint32_t code_length
Length in bits of the code.
int(*const decode_func)(struct ir_remote *remote, struct decode_ctx_t *ctx)
TODO.
uint32_t features
Code for the features of the present device, valid after init().
const char * info
Free text driver info.
char *(*const rec_func)(struct ir_remote *remotes)
Receive data from remote.
lirc_t(*const readdata)(lirc_t timeout)
Get length of next pulse/space from hardware.
int(*const deinit_func)(void)
Function called when transmitting/receiving stops.
int(*const init_func)(void)
Function called for initializing the driver and the hardware.
int(*const send_func)(struct ir_remote *remote, struct ir_ncode *code)
Send data to the remote.
unsigned int resolution
The resolution in microseconds of the recorded durations when reading signals.
const char *const device_hint
device_hint is a mean for config tools to autodetect devices.
int(*const drvctl_func)(unsigned int cmd, void *arg)
Generic driver control function with semantics as defined by driver Returns 0 on success,...
const char * device
Name of the device (string).
int(*const close_func)(void)
Hard closing, returns 0 on OK.
int(*const open_func)(const char *device)
Function called to do basic driver setup.
uint32_t rec_mode
Possible values are: LIRC_MODE_RAW, LIRC_MODE_PULSE, LIRC_MODE_MODE2, LIRC_MODE_LIRCCODE.
IR Command, corresponding to one (command defining) line of the configuration file.
One remote as represented in the configuration file.
Argument for DRV_SET_OPTION.