Loading...
Searching...
No Matches
driver.h File Reference
User-space driver API | Internal API

Interface to the userspace drivers. More...

`#include <glob.h>`
`#include <stdint.h>`
`#include "media/lirc.h"`
`#include "lirc/ir_remote_types.h"`
`#include "lirc/curl_poll.h"`

Go to the source code of this file.

## Classes

struct | option_t
| Argument for DRV_SET_OPTION. More...
struct | driver
| The data the driver exports i. More...

## Macros

#define | MAXPATHLEN 4096
#define | HAVE_SERVER_VERSION 1
| Testable flag for get_server_version() presence.
#define | DRV_ERR_NOT_IMPLEMENTED 1
| drvctl definitions
#define | DRVCTL_GET_STATE 1
| Drvctl cmd: return current state as an int in *arg.
#define | DRVCTL_SEND_SPACE 2
| Drvctl cmd: Send long space.
#define | DRVCTL_SET_OPTION 3
| Drvctl cmd: Set driver options.
#define | DRVCTL_GET_RAW_CODELENGTH 4
| Drvctl cmd: get raw length to read, if different than codelength.
#define | DRVCTL_GET_DEVICES 5
| Drvctl cmd: get list of possible devices.
#define | DRVCTL_FREE_DEVICES 6
| drvctl cmd: Free memory in argument obtained using DRVCTL_GET_DEVICES.
#define | DRVCTL_NOTIFY_DECODE 7
| The former LIRC_NOTIFY_DECODE, informs drier that signal is successfully decoded e.
#define | DRVCTL_MAX 128
| Last well-known command.
#define | DRV_ERR_NOT_IMPLEMENTED 1
| drvctl definitions
#define | DRV_ERR_BAD_STATE 2
| drvctl error: cmd and arg is OK, but other errors.
#define | DRV_ERR_BAD_OPTION 3
| drvctl error: cmd is bad
#define | DRV_ERR_BAD_VALUE 4
| drvctl error: arg is bad
#define | DRV_ERR_ENUM_EMPTY 5
| No requested data available.
#define | DRV_ERR_INTERNAL 6
| drvctl error: "Should not happen" type of errors.

## Functions

int | get_server_version (void)
| Return numeric server version, m.v.r => 10000 * m + 100 * v + r.
int | default_open (const char *path)
| Stores path in drv.device if non-null.
int | default_close (void)
| For now, a placeholder.
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.

## Variables

const struct driver *const | curr_driver
| Read-only access to drv for application.

## Detailed Description

Interface to the userspace drivers.

Definition in file driver.h.

## Variable Documentation

## curr_driver

const struct driver* const curr_driver

extern

Read-only access to drv for application.

Read-only access to drv for application.

Definition at line 34 of file driver.c.