|
|
Subscribe / Log in / New account

IR decoding with BPF

IR decoding with BPF

Posted Jul 12, 2018 9:35 UTC (Thu) by seanyoung (subscriber, #28711)
In reply to: IR decoding with BPF by shiftee
Parent article: IR decoding with BPF

For the modbus case there is a BPF function bpf_ktime_get_ns() available which can be used for processing timeouts correctly.

This is an interesting idea. I have a device which produces packets on usb-serial; the process wakes up for nearly every byte that arrives, which causes load on the underpowered arm device it is attached to. It would be nice if the process could be woken up only when a complete packet arrives, and invalid packets get dropped.

This seems similar to the original purpose of BPF. The BPF program would need access to the serial buffer and control read readiness reporting.


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds