hid-example.c (94bd217e2d683719ab21a4ac117d8a1b91cbedc9) | hid-example.c (f37130533f68711fd6bae2c79950b8e72002bad6) |
---|---|
1/* 2 * Hidraw Userspace Example 3 * 4 * Copyright (c) 2010 Alan Ott <alan@signal11.us> 5 * Copyright (c) 2010 Signal 11 Software 6 * 7 * The code may be used by anyone for any purpose, 8 * and can serve as a starting point for developing 9 * applications using hidraw. 10 */ 11 12/* Linux */ 13#include <linux/types.h> 14#include <linux/input.h> 15#include <linux/hidraw.h> 16 17/* 18 * Ugly hack to work around failing compilation on systems that don't 19 * yet populate new version of hidraw.h to userspace. | 1/* 2 * Hidraw Userspace Example 3 * 4 * Copyright (c) 2010 Alan Ott <alan@signal11.us> 5 * Copyright (c) 2010 Signal 11 Software 6 * 7 * The code may be used by anyone for any purpose, 8 * and can serve as a starting point for developing 9 * applications using hidraw. 10 */ 11 12/* Linux */ 13#include <linux/types.h> 14#include <linux/input.h> 15#include <linux/hidraw.h> 16 17/* 18 * Ugly hack to work around failing compilation on systems that don't 19 * yet populate new version of hidraw.h to userspace. |
20 * 21 * If you need this, please have your distro update the kernel headers. | |
22 */ 23#ifndef HIDIOCSFEATURE | 20 */ 21#ifndef HIDIOCSFEATURE |
22#warning Please have your distro update the userspace kernel headers |
|
24#define HIDIOCSFEATURE(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x06, len) 25#define HIDIOCGFEATURE(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x07, len) 26#endif 27 28/* Unix */ 29#include <sys/ioctl.h> 30#include <sys/types.h> 31#include <sys/stat.h> --- 147 unchanged lines hidden --- | 23#define HIDIOCSFEATURE(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x06, len) 24#define HIDIOCGFEATURE(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x07, len) 25#endif 26 27/* Unix */ 28#include <sys/ioctl.h> 29#include <sys/types.h> 30#include <sys/stat.h> --- 147 unchanged lines hidden --- |