/** * struct img_ir_control - Decoder control settings * @decoden: Primary decoder enable * @code_type: Decode type (see IMG_IR_CODETYPE_*) * @hdrtog: Detect header toggle symbol after leader symbol * @ldrdec: Don't discard leader if maximum width reached * @decodinpol: Decoder input polarity (1=active high) * @bitorien: Bit orientation (1=MSB first) * @d1validsel: Decoder 2 takes over if it detects valid data * @bitinv: Bit inversion switch (1=don't invert) * @decodend2: Secondary decoder enable (no leader symbol) * @bitoriend2: Bit orientation (1=MSB first) * @bitinvd2: Secondary decoder bit inversion switch (1=don't invert)
*/ struct img_ir_control { unsigned decoden:1; unsigned code_type:2; unsigned hdrtog:1; unsigned ldrdec:1; unsigned decodinpol:1; unsigned bitorien:1; unsigned d1validsel:1; unsigned bitinv:1; unsigned decodend2:1; unsigned bitoriend2:1; unsigned bitinvd2:1;
};
/** * struct img_ir_timing_range - range of timing values * @min: Minimum timing value * @max: Maximum timing value (if < @min, this will be set to @min during * preprocessing step, so it is normally not explicitly initialised * and is taken care of by the tolerance)
*/ struct img_ir_timing_range {
u16 min;
u16 max;
};
/** * struct img_ir_symbol_timing - timing data for a symbol * @pulse: Timing range for the length of the pulse in this symbol * @space: Timing range for the length of the space in this symbol
*/ struct img_ir_symbol_timing { struct img_ir_timing_range pulse; struct img_ir_timing_range space;
};
/** * struct img_ir_free_timing - timing data for free time symbol * @minlen: Minimum number of bits of data * @maxlen: Maximum number of bits of data * @ft_min: Minimum free time after message
*/ struct img_ir_free_timing { /* measured in bits */
u8 minlen;
u8 maxlen;
u16 ft_min;
};
/** * struct img_ir_timings - Timing values. * @ldr: Leader symbol timing data * @s00: Zero symbol timing data for primary decoder * @s01: One symbol timing data for primary decoder * @s10: Zero symbol timing data for secondary (no leader symbol) decoder * @s11: One symbol timing data for secondary (no leader symbol) decoder * @ft: Free time symbol timing data
*/ struct img_ir_timings { struct img_ir_symbol_timing ldr, s00, s01, s10, s11; struct img_ir_free_timing ft;
};
/** * struct img_ir_filter - Filter IR events. * @data: Data to match. * @mask: Mask of bits to compare. * @minlen: Additional minimum number of bits. * @maxlen: Additional maximum number of bits.
*/ struct img_ir_filter {
u64 data;
u64 mask;
u8 minlen;
u8 maxlen;
};
/** * struct img_ir_timing_regvals - Calculated timing register values. * @ldr: Leader symbol timing register value * @s00: Zero symbol timing register value for primary decoder * @s01: One symbol timing register value for primary decoder * @s10: Zero symbol timing register value for secondary decoder * @s11: One symbol timing register value for secondary decoder * @ft: Free time symbol timing register value
*/ struct img_ir_timing_regvals {
u32 ldr, s00, s01, s10, s11, ft;
};
#define IMG_IR_SCANCODE 0 /* new scancode */ #define IMG_IR_REPEATCODE 1 /* repeat the previous code */
/** * struct img_ir_scancode_req - Scancode request data. * @protocol: Protocol code of received message (defaults to * RC_PROTO_UNKNOWN). * @scancode: Scan code of received message (must be written by * handler if IMG_IR_SCANCODE is returned). * @toggle: Toggle bit (defaults to 0).
*/ struct img_ir_scancode_req { enum rc_proto protocol;
u32 scancode;
u8 toggle;
};
/** * struct img_ir_decoder - Decoder settings for an IR protocol. * @type: Protocol types bitmap. * @tolerance: Timing tolerance as a percentage (default 10%). * @unit: Unit of timings in nanoseconds (default 1 us). * @timings: Primary timings * @rtimings: Additional override timings while waiting for repeats. * @repeat: Maximum repeat interval (always in milliseconds). * @control: Control flags. * * @scancode: Pointer to function to convert the IR data into a scancode (it * must be safe to execute in interrupt context). * Returns IMG_IR_SCANCODE to emit new scancode. * Returns IMG_IR_REPEATCODE to repeat previous code. * Returns -errno (e.g. -EINVAL) on error. * @filter: Pointer to function to convert scancode filter to raw hardware * filter. The minlen and maxlen fields will have been initialised * to the maximum range.
*/ struct img_ir_decoder { /* core description */
u64 type; unsignedint tolerance; unsignedint unit; struct img_ir_timings timings; struct img_ir_timings rtimings; unsignedint repeat; struct img_ir_control control;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.