#include <driver.h>
The data the driver exports i. e., lirc accesses the driver as defined here.
- Examples:
- drivers/default/Makefile.
Definition at line 83 of file driver.h.
const int driver::api_version |
API version (from version 2+).
Definition at line 185 of file driver.h.
int(*const driver::close_func)(void) |
Hard closing, returns 0 on OK.
Definition at line 189 of file driver.h.
const __u32 driver::code_length |
Length in bits of the code.
Definition at line 111 of file driver.h.
int(*const driver::deinit_func)(void) |
Function called when transmitting/receiving stops. Zero return value indicates failure, all other return values success.
Definition at line 131 of file driver.h.
const char* driver::device |
Name of the device (string). Set by open_func() before init(), possibly using the hard-coded driver default value.
Definition at line 90 of file driver.h.
const char* driver::driver_version |
Driver version (free text).
Definition at line 186 of file driver.h.
int(*const driver::drvctl_func)(unsigned int cmd, void *arg) |
Generic driver control function with semantics as defined by driver Returns 0 on success, else a positive error code.
Definition at line 160 of file driver.h.
Set by the driver after init().
Definition at line 93 of file driver.h.
Code for the features of the present device, valid after init().
Definition at line 96 of file driver.h.
Free text driver info.
Definition at line 187 of file driver.h.
int(*const driver::init_func)(void) |
Function called for initializing the driver and the hardware. Zero return value indicates failure, all other return values success.
Definition at line 125 of file driver.h.
Driver name, as listed by -H help and used as argument to i –driver.
Definition at line 175 of file driver.h.
int(*const driver::open_func)(const char *device) |
Function called to do basic driver setup.
- Parameters
-
device | String describing what device driver should communicate with. Often (but not always) a /dev/... path. |
- Returns
- 0 if everything is fine, else positive error code.
Definition at line 119 of file driver.h.
lirc_t(*const driver::readdata)(lirc_t timeout) |
Get length of next pulse/space from hardware.
- Parameters
-
timeout | Max time to wait (us). |
- Returns
- Length of pulse in lower 24 bits (us). PULSE_BIT is set to reflect if this is a pulse or space. 0 indicates errors.
Definition at line 169 of file driver.h.
char*(*const driver::rec_func)(struct ir_remote *remotes) |
Receive data from remote. Might close device on error conditions.
- Parameters
-
- Returns
- Formatted, statically allocated string with decoded data: "remote-name code-name code repetitions"
Definition at line 148 of file driver.h.
Possible values are: LIRC_MODE_RAW, LIRC_MODE_PULSE, LIRC_MODE_MODE2, LIRC_MODE_LIRCCODE. These can be combined using bitwise or.
Definition at line 108 of file driver.h.
unsigned int driver::resolution |
The resolution in microseconds of the recorded durations when reading signals.
Definition at line 181 of file driver.h.
Send data to the remote.
- Parameters
-
remote | The remote used to send. |
code | Code(s) to send, a single code or the head of a list of codes. |
Definition at line 139 of file driver.h.
Possible values are: LIRC_MODE_RAW, LIRC_MODE_PULSE, LIRC_MODE_MODE2, LIRC_MODE_LIRCCODE. These can be combined using bitwise or.
Definition at line 102 of file driver.h.
The documentation for this struct was generated from the following file: