img_ir_timing_range_convert(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ 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 of 128 (roughly percent). Yes, 128 is 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:


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