ir_raw_encode_scancode(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ir_raw_encode_scancode(9) πŸ’…

Okay bestie, welcome to the Kernel API Manual β€” today's main character is ir_raw_encode_scancode, and it is literally here to encode a scancode as raw events. No cap. 🫢


🌸 NAME 🌸

ir_raw_encode_scancode β€” Encode a scancode as raw events. That's the whole thing. It's giving "does exactly what it says on the tin". ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

int ir_raw_encode_scancode (enum rc_proto protocol , u32 scancode ,
struct ir_raw_event *events , unsigned int max );

πŸŽ€ ARGUMENTS πŸŽ€

  • protocol β€” the protocol, bestie. Yeah, it's just the protocol (enum rc_proto, iykyk). πŸ’–
  • scancode β€” a scancode filter describing a single scancode. Like, one (1) scancode. πŸ“
  • events β€” array of raw events to write into. This is where the magic lands. ✨
  • max β€” max number of raw events. The ceiling. The limit. Respect it. πŸ’…

πŸ”₯ DESCRIPTION πŸ”₯

Attempts to encode the scancode as raw events. That's it β€” it attempts, okay? "Attempts" is the key word, so don't come for me if the vibe check doesn't pass. 😭


⭐ RETURN ⭐

  • The number of events written β€” slay, it worked. πŸ‘‘
  • -ENOBUFS β€” if there isn't enough space in the array to fit the encoding. In this case all max events will have been written β€” so like, it wrote as much as it could, bestie, sorry. πŸ’€
  • -EINVAL β€” if the scancode is ambiguous or invalid, or if no compatible encoder was found. That's a no from me. πŸ™ˆ

🌈 SEE ALSO 🌈

Kernel file ./drivers/media/rc/rc-ir-raw.c πŸ’œ


And that's the whole page, bestie β€” the source line is ./drivers/media/rc, the date is October 2026, and yeah, the footer is still repping ir_raw_encode_scancode(9) because we stay on brand. πŸ’…βœ¨ Mwah. 🧚

πŸ“¦ where this page comes from