img_ir_timing_range_convert(9)
π¦ img_ir_timing_range_convert(9) π¦
okay so bestie, this page is from the Kernel API Manual, and itβs giving βtiny iconic helper functionβ energy. No cap, itβs literally here to convert a microsecond range and make it make sense. β¨
π NAME π
img_ir_timing_range_convert β Convert microsecond range. periodt π
β¨ SYNOPSIS β¨
void img_ir_timing_range_convert (struct img_ir_timing_range *out , const struct img_ir_timing_range *in , unsigned int tolerance , unsigned long clock_hz , unsigned int shift );
π ARGUMENTS π
outβ Output timing range in clock cycles with a shift. Sheβs the destination, bestie.inβ Input timing range in microseconds. The source vibe.toleranceβ Tolerance as a fraction of128(roughly percent). Yes,128is the magic fraction number here.clock_hzβ IR clock rate in Hz. Thatβs the clock speed setting.shiftβ Shift of output units. It shifts the output units, iykyk.
π DESCRIPTION π
okay so this function converts min and max from microseconds to IR clock cycles, applies a tolerance, and shifts for the register β rounding in the right direction. Itβs literally doing the convert-and-shift-and-round combo, and it ate. π₯
And the iconic part? in and out can safely be the same object. So no need to panic about aliasing here, bestie. π«Ά
π SEE ALSO π
The kernel file is ./drivers/media/rc/img-ir/img-ir-hw.c, and the whole squad is:
img_ir_control(9)img_ir_symbol_timing(9)img_ir_free_timing(9)img_ir_free_timing_dynamic(9)img_ir_timings_convert(9)img_ir_decoder_preprocess(9)img_ir_decoder_convert(9)img_ir_write_timings(9)img_ir_set_decoder(9)img_ir_decoder_compatible(9)img_ir_allowed_protos(9)img_ir_enable_wake(9)img_ir_disable_wake(9)img_ir_probe_hw_caps(9)
mwah π this cutie is signed off from ./drivers/media/rc/img-ir and dated October 2026. bye bestie, slay your timings! π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms