Loading...
Searching...
No Matches
ir_remote.c File Reference

Implements ir_remote.h. More...

`#include <stdlib.h>`
`#include <stdio.h>`
`#include <stdint.h>`
`#include <fcntl.h>`
`#include <limits.h>`
`#include <sys/ioctl.h>`
`#include "media/lirc.h"`
`#include "lirc/ir_remote.h"`
`#include "lirc/driver.h"`
`#include "lirc/release.h"`
`#include "lirc/lirc_log.h"`

Go to the source code of this file.

## Functions

struct ir_ncode * | ncode_dup (struct ir_ncode *ncode)
| Create a malloc'd, deep copy of ncode.
void | ncode_free (struct ir_ncode *ncode)
| Dispose an ir_ncode instance obtained from ncode_dup().
void | ir_remote_init (int use_dyncodes)
| Initiate: define if dynamic codes should be used.
void | get_frequency_range (const struct ir_remote *remotes, unsigned int *min_freq, unsigned int *max_freq)
void | get_filter_parameters (const struct ir_remote *remotes, lirc_t *max_gap_lengthp, lirc_t *min_pulse_lengthp, lirc_t *min_space_lengthp, lirc_t *max_pulse_lengthp, lirc_t *max_space_lengthp)
const struct ir_remote * | is_in_remotes (const struct ir_remote *remotes, const struct ir_remote *remote)
| Test if a given remote is in a list of remotes.
struct ir_remote * | get_ir_remote (const struct ir_remote *remotes, const char *name)
| Return ir_remote with given name in remotes list, or NULL if not found.
int | map_code (const struct ir_remote *remote, struct decode_ctx_t *ctx, int pre_bits, ir_code pre, int bits, ir_code code, int post_bits, ir_code post)
void | map_gap (const struct ir_remote *remote, struct decode_ctx_t *ctx, const struct timeval *start, const struct timeval *last, lirc_t signal_length)
struct ir_ncode * | get_code_by_name (const struct ir_remote *remote, const char *name)
| Return code with given name in remote's list of codes or NULL.
void | find_longest_match (struct ir_remote *remote, struct ir_ncode *codes, ir_code all, ir_code *next_all, int have_code, struct ir_ncode **found, int *found_code)
int | write_message (char *buffer, size_t size, const char *remote_name, const char *button_name, const char *button_suffix, ir_code code, int reps)
| Formats the arguments into a readable string.
char * | decode_all (struct ir_remote *remotes)
| Tries to decode current signal trying all known remotes.
int | send_ir_ncode (struct ir_remote *remote, struct ir_ncode *code, int delay)
| Transmits the actual code in the second argument by calling the current hardware driver.
const struct ir_remote * | get_decoding (void)
| Return pointer to currently decoded remote.

## Variables

struct ir_remote * | decoding = NULL
struct ir_remote * | last_remote = NULL
| TODO.
struct ir_remote * | repeat_remote = NULL
| Global pointer to the remote that contains the code currently repeating.
struct ir_ncode * | repeat_code
| Global pointer to the code currently repeating.

## Detailed Description

Implements ir_remote.h.

Authors
  Ralph Metzler, Christoph Bartelmus

Copyright
  Copyright (C) 1996,97 Ralph Metzler (rjkm@.nosp@m.thp..nosp@m.uni-k.nosp@m.oeln.nosp@m..de) Copyright (C) 1998 Christoph Bartelmus (lirc@.nosp@m.bart.nosp@m.elmus.nosp@m..de)

Definition in file ir_remote.c.

## Function Documentation

## find_longest_match()

void find_longest_match | ( | struct ir_remote * | remote,
|  | struct ir_ncode * | codes,
|  | ir_code | all,
|  | ir_code * | next_all,
|  | int | have_code,
|  | struct ir_ncode ** | found,
|  | int * | found_code
| ) |  |

Definition at line 413 of file ir_remote.c.

## Variable Documentation

## decoding

struct ir_remote* decoding = NULL

Definition at line 53 of file ir_remote.c.