ir_raw_encode_scancode(9)
π
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 allmaxevents 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 π
ir_raw_event_store(9)ir_raw_event_store_edge(9)ir_raw_event_store_with_filter(9)ir_raw_event_set_idle(9)ir_raw_event_handle(9)ir_raw_gen_manchester(9)ir_raw_gen_pd(9)ir_raw_gen_pl(9)ir_raw_edge_handle(9)ir_raw_encode_carrier(9)
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
- 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