Lines Matching +full:pulse +full:- +full:width
1 /* SPDX-License-Identifier: GPL-2.0 */
12 /* Define the max number of pulse/space transitions to buffer */
17 #include <media/rc-core.h>
20 * rc_open - Opens a RC device
27 * rc_close - Closes a RC device
51 /* fifo for the pulse/space durations */
169 return d1 > (d2 - margin); in geq_margin()
174 return ((d1 > (d2 - margin)) && (d1 < (d2 + margin))); in eq_margin()
179 return x->pulse != y->pulse; in is_transition()
184 if (duration > ev->duration) in decrease_duration()
185 ev->duration = 0; in decrease_duration()
187 ev->duration -= duration; in decrease_duration()
190 /* Returns true if event is normal pulse/space event */
196 #define TO_STR(is_pulse) ((is_pulse) ? "pulse" : "space")
202 unsigned int pulse, in init_ir_raw_event_duration() argument
207 .pulse = pulse in init_ir_raw_event_duration()
212 * struct ir_raw_timings_manchester - Manchester coding timings
213 * @leader_pulse: duration of leader pulse (if any) 0 if continuing
216 * @clock: duration of each pulse/space in ns
218 * (0 = space + pulse, 1 = pulse + space)
234 * ir_raw_gen_pulse_space() - generate pulse and space raw events.
239 * @pulse_width: Width of pulse in ns.
240 * @space_width: Width of space in ns.
243 * -ENOBUFS if there isn't enough buffer space to write both raw
252 return -ENOBUFS; in ir_raw_gen_pulse_space()
254 if (!--*max) in ir_raw_gen_pulse_space()
255 return -ENOBUFS; in ir_raw_gen_pulse_space()
257 --*max; in ir_raw_gen_pulse_space()
262 * struct ir_raw_timings_pd - pulse-distance modulation timings
263 * @header_pulse: duration of header pulse in ns (0 for none)
265 * @bit_pulse: duration of bit pulse in ns
267 * @trailer_pulse: duration of trailer pulse in ns
286 * struct ir_raw_timings_pl - pulse-length modulation timings
287 * @header_pulse: duration of header pulse in ns (0 for none)
289 * @bit_pulse: duration of bit pulse (for logic 0 and 1) in ns
306 * Routines from rc-raw.c to be used internally and by decoders