Lines Matching +full:clock +full:- +full:duration +full:- +full:ns
1 /* SPDX-License-Identifier: GPL-2.0 */
17 #include <media/rc-core.h>
20 * rc_open - Opens a RC device
27 * rc_close - Closes a RC device
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()
182 static inline void decrease_duration(struct ir_raw_event *ev, unsigned duration) in decrease_duration() argument
184 if (duration > ev->duration) in decrease_duration()
185 ev->duration = 0; in decrease_duration()
187 ev->duration -= duration; in decrease_duration()
203 u32 duration) in init_ir_raw_event_duration() argument
206 .duration = duration, 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
215 * @leader_space: duration of leader space (if any)
216 * @clock: duration of each pulse/space in ns
217 * @invert: if set clock logic is inverted
219 * @trailer_space: duration of trailer space in ns
224 unsigned int clock; member
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)
264 * @header_space: duration of header space in ns
265 * @bit_pulse: duration of bit pulse in ns
266 * @bit_space: duration of bit space (for logic 0 and 1) in ns
267 * @trailer_pulse: duration of trailer pulse in ns
268 * @trailer_space: duration of trailer space in ns
286 * struct ir_raw_timings_pl - pulse-length modulation timings
287 * @header_pulse: duration of header pulse in ns (0 for none)
288 * @bit_space: duration of bit space in ns
289 * @bit_pulse: duration of bit pulse (for logic 0 and 1) in ns
290 * @trailer_space: duration of trailer space in ns
306 * Routines from rc-raw.c to be used internally and by decoders