// SPDX-License-Identifier: GPL-2.0-only /* Copyright (c) 2022 Benjamin Tissoires * * This is a pure HID-BPF example, and should be considered as such: * on the Etekcity Scroll 6E, the X and Y axes will be swapped and * inverted. On any other device... Not sure what this will do. * * This C main file is generic though. To adapt the code and test, users * must amend only the .bpf.c file, which this program will load any * eBPF program it finds.
*/
staticvoid usage(constchar *prog)
{
fprintf(stderr, "%s: %s /sys/bus/hid/devices/0BUS:0VID:0PID:00ID\n\n",
__func__, prog);
fprintf(stderr, "This program will upload and attach a HID-BPF program to the given device.\n" "On the Etekcity Scroll 6E, the X and Y axis will be inverted, but on any other\n" "device, chances are high that the device will not be working anymore\n\n" "consider this as a demo and adapt the eBPF program to your needs\n" "Hit Ctrl-C to unbind the program and reset the device\n");
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.