- 论坛徽章:
- 0
|
kernel: 2.6.20-16
linux version: ubuntu 7.04
include <stdlib.h>
#include <stdio.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <asm/types.h>
#include <fcntl.h>
#include <unistd.h>
#include <linux/hiddev.h>
#define DEBUG 1
#define HID_MAX_MULTI_USAGES 1024
#define HIDIOCGUSAGES _IOWR('H', 0x13, struct hiddev_usage_ref_multi)
#define HIDIOCSUSAGES _IOW('H', 0x14, struct hiddev_usage_ref_multi)
#define HID_MAX_MULTI_USAGES 1024
struct hiddev_usage_ref_multi{
struct hiddev_usage_ref uref;
__u32 num_values;
__s32 values[HID_MAX_MULTI_USAGES];
};
int main (int argc, char **argv)
{
struct hiddev_report_info rinfo;
struct hiddev_usage_ref uref;
struct hiddev_field_info finfo;
struct hiddev_usage_ref_multi urefs;
unsigned char byLgtOn[] = {0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
unsigned char byLgtOff[] = {0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
printf("test\n");
}
gcc file.c
出错误提示如下:
file.c:20: 错误: ‘struct hiddev_usage_ref_multi’ 重定义
/usr/include/linux/hiddev.h:132: 错误: ‘struct hiddev_usage_ref_multi’ 的上一个定义 |
|