1 // SPDX-License-Identifier: GPL-2.0
4 // Copyright (C) 2018 Sean Young <sean@mess.org>
7 #include <linux/lirc.h>
8 #include "bpf_helpers.h"
11 int bpf_decoder(unsigned int *sample)
13 if (LIRC_IS_PULSE(*sample)) {
14 unsigned int duration = LIRC_VALUE(*sample);
16 if (duration & 0x10000)
17 bpf_rc_keydown(sample, 0x40, duration & 0xffff, 0);
23 char _license[] SEC("license") = "GPL";