ir_raw_gen_pl(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ir_raw_gen_pl(9) β€” the Kernel API Manual, bestie edition ✨

okay so we're in the Kernel API Manual today and the star of the show is ir_raw_gen_pl β€” say hi πŸ‘‹


πŸŽ€ NAME πŸŽ€

ir_raw_gen_pl β€” Encode data to raw events with pulse-length modulation.

✨ SYNOPSIS ✨

int ir_raw_gen_pl (struct ir_raw_event **ev , unsigned int max , const
       struct ir_raw_timings_pl *timings , unsigned int n , u64 data );

🫢 ARGUMENTS 🫢

  • ev β€” Pointer to pointer to next free event. *ev is incremented for each raw event filled. she moves the pointer forward as she fills, main character energy fr πŸ’…
  • max β€” Maximum number of raw events to fill.
  • timings β€” Pulse distance modulation timings.
  • n β€” Number of bits of data.
  • data β€” Data bits to encode.

🌸 DESCRIPTION 🌸

okay so picture this: it encodes the n least significant bits of data using space-distance modulation, with the timing characteristics described by timings πŸ¦‹ and it writes up to max raw IR events using the *ev pointer. that's the whole vibe. it's giving "just do the encoding, no drama" ✨

πŸ’– RETURN πŸ’–

  • 0 on success πŸŽ‰ slay
  • -ENOBUFS if there isn't enough space in the array to fit the full encoded data. and bestie, listen: in this case all max events will have been written 😭 so yeah, they got written, there just wasn't room for the whole thing. be aware.
no cap, if you see -ENOBUFS you were too small on max and it filled everything it could before bailing πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/media/rc/rc-ir-raw.c and the whole friend group πŸ‘‘


alright bestie, that's the page πŸ’œ this one lives in ./drivers/media/rc and it's dated October 2026 β€” go off, encode those bits, and remember: pulse-length modulation is iconic, periodt 🌈⭐

πŸ“¦ where this page comes from