Switch kernel header parsing to python libclang
Replace the tokenizer in cpp.py with libclang. Bug: 18937958 Change-Id: I27630904c6d2849418cd5ca3d3c612ec3078686d
This commit is contained in:
@@ -24,40 +24,40 @@
|
||||
#include <sys/types.h>
|
||||
#include <linux/types.h>
|
||||
struct input_event {
|
||||
struct timeval time;
|
||||
struct timeval time;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
__u16 type;
|
||||
__u16 code;
|
||||
__s32 value;
|
||||
__u16 type;
|
||||
__u16 code;
|
||||
__s32 value;
|
||||
};
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
#define EV_VERSION 0x010001
|
||||
struct input_id {
|
||||
__u16 bustype;
|
||||
__u16 vendor;
|
||||
__u16 bustype;
|
||||
__u16 vendor;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
__u16 product;
|
||||
__u16 version;
|
||||
__u16 product;
|
||||
__u16 version;
|
||||
};
|
||||
struct input_absinfo {
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
__s32 value;
|
||||
__s32 minimum;
|
||||
__s32 maximum;
|
||||
__s32 fuzz;
|
||||
__s32 value;
|
||||
__s32 minimum;
|
||||
__s32 maximum;
|
||||
__s32 fuzz;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
__s32 flat;
|
||||
__s32 resolution;
|
||||
__s32 flat;
|
||||
__s32 resolution;
|
||||
};
|
||||
struct input_keymap_entry {
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
#define INPUT_KEYMAP_BY_INDEX (1 << 0)
|
||||
__u8 flags;
|
||||
__u8 len;
|
||||
__u16 index;
|
||||
__u8 flags;
|
||||
__u8 len;
|
||||
__u16 index;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
__u32 keycode;
|
||||
__u8 scancode[32];
|
||||
__u32 keycode;
|
||||
__u8 scancode[32];
|
||||
};
|
||||
#define EVIOCGVERSION _IOR('E', 0x01, int)
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
@@ -118,7 +118,7 @@ struct input_keymap_entry {
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
#define EV_FF_STATUS 0x17
|
||||
#define EV_MAX 0x1f
|
||||
#define EV_CNT (EV_MAX+1)
|
||||
#define EV_CNT (EV_MAX + 1)
|
||||
#define SYN_REPORT 0
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
#define SYN_CONFIG 1
|
||||
@@ -126,7 +126,7 @@ struct input_keymap_entry {
|
||||
#define SYN_DROPPED 3
|
||||
#define SYN_MAX 0xf
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
#define SYN_CNT (SYN_MAX+1)
|
||||
#define SYN_CNT (SYN_MAX + 1)
|
||||
#define KEY_RESERVED 0
|
||||
#define KEY_ESC 1
|
||||
#define KEY_1 2
|
||||
@@ -798,7 +798,7 @@ struct input_keymap_entry {
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
#define KEY_MIN_INTERESTING KEY_MUTE
|
||||
#define KEY_MAX 0x2ff
|
||||
#define KEY_CNT (KEY_MAX+1)
|
||||
#define KEY_CNT (KEY_MAX + 1)
|
||||
#define REL_X 0x00
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
#define REL_Y 0x01
|
||||
@@ -813,7 +813,7 @@ struct input_keymap_entry {
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
#define REL_MISC 0x09
|
||||
#define REL_MAX 0x0f
|
||||
#define REL_CNT (REL_MAX+1)
|
||||
#define REL_CNT (REL_MAX + 1)
|
||||
#define ABS_X 0x00
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
#define ABS_Y 0x01
|
||||
@@ -867,7 +867,7 @@ struct input_keymap_entry {
|
||||
#define ABS_MT_TOOL_Y 0x3d
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
#define ABS_MAX 0x3f
|
||||
#define ABS_CNT (ABS_MAX+1)
|
||||
#define ABS_CNT (ABS_MAX + 1)
|
||||
#define SW_LID 0x00
|
||||
#define SW_TABLET_MODE 0x01
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
@@ -889,7 +889,7 @@ struct input_keymap_entry {
|
||||
#define SW_LINEIN_INSERT 0x0d
|
||||
#define SW_MUTE_DEVICE 0x0e
|
||||
#define SW_MAX 0x0f
|
||||
#define SW_CNT (SW_MAX+1)
|
||||
#define SW_CNT (SW_MAX + 1)
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
#define MSC_SERIAL 0x00
|
||||
#define MSC_PULSELED 0x01
|
||||
@@ -899,7 +899,7 @@ struct input_keymap_entry {
|
||||
#define MSC_SCAN 0x04
|
||||
#define MSC_TIMESTAMP 0x05
|
||||
#define MSC_MAX 0x07
|
||||
#define MSC_CNT (MSC_MAX+1)
|
||||
#define MSC_CNT (MSC_MAX + 1)
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
#define LED_NUML 0x00
|
||||
#define LED_CAPSL 0x01
|
||||
@@ -916,18 +916,18 @@ struct input_keymap_entry {
|
||||
#define LED_CHARGING 0x0a
|
||||
#define LED_MAX 0x0f
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
#define LED_CNT (LED_MAX+1)
|
||||
#define LED_CNT (LED_MAX + 1)
|
||||
#define REP_DELAY 0x00
|
||||
#define REP_PERIOD 0x01
|
||||
#define REP_MAX 0x01
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
#define REP_CNT (REP_MAX+1)
|
||||
#define REP_CNT (REP_MAX + 1)
|
||||
#define SND_CLICK 0x00
|
||||
#define SND_BELL 0x01
|
||||
#define SND_TONE 0x02
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
#define SND_MAX 0x07
|
||||
#define SND_CNT (SND_MAX+1)
|
||||
#define SND_CNT (SND_MAX + 1)
|
||||
#define ID_BUS 0
|
||||
#define ID_VENDOR 1
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
@@ -966,77 +966,77 @@ struct input_keymap_entry {
|
||||
#define FF_STATUS_MAX 0x01
|
||||
struct ff_replay {
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
__u16 length;
|
||||
__u16 delay;
|
||||
__u16 length;
|
||||
__u16 delay;
|
||||
};
|
||||
struct ff_trigger {
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
__u16 button;
|
||||
__u16 interval;
|
||||
__u16 button;
|
||||
__u16 interval;
|
||||
};
|
||||
struct ff_envelope {
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
__u16 attack_length;
|
||||
__u16 attack_level;
|
||||
__u16 fade_length;
|
||||
__u16 fade_level;
|
||||
__u16 attack_length;
|
||||
__u16 attack_level;
|
||||
__u16 fade_length;
|
||||
__u16 fade_level;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
};
|
||||
struct ff_constant_effect {
|
||||
__s16 level;
|
||||
struct ff_envelope envelope;
|
||||
__s16 level;
|
||||
struct ff_envelope envelope;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
};
|
||||
struct ff_ramp_effect {
|
||||
__s16 start_level;
|
||||
__s16 end_level;
|
||||
__s16 start_level;
|
||||
__s16 end_level;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
struct ff_envelope envelope;
|
||||
struct ff_envelope envelope;
|
||||
};
|
||||
struct ff_condition_effect {
|
||||
__u16 right_saturation;
|
||||
__u16 right_saturation;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
__u16 left_saturation;
|
||||
__s16 right_coeff;
|
||||
__s16 left_coeff;
|
||||
__u16 deadband;
|
||||
__u16 left_saturation;
|
||||
__s16 right_coeff;
|
||||
__s16 left_coeff;
|
||||
__u16 deadband;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
__s16 center;
|
||||
__s16 center;
|
||||
};
|
||||
struct ff_periodic_effect {
|
||||
__u16 waveform;
|
||||
__u16 waveform;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
__u16 period;
|
||||
__s16 magnitude;
|
||||
__s16 offset;
|
||||
__u16 phase;
|
||||
__u16 period;
|
||||
__s16 magnitude;
|
||||
__s16 offset;
|
||||
__u16 phase;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
struct ff_envelope envelope;
|
||||
__u32 custom_len;
|
||||
__s16 __user *custom_data;
|
||||
struct ff_envelope envelope;
|
||||
__u32 custom_len;
|
||||
__s16 __user * custom_data;
|
||||
};
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
struct ff_rumble_effect {
|
||||
__u16 strong_magnitude;
|
||||
__u16 weak_magnitude;
|
||||
__u16 strong_magnitude;
|
||||
__u16 weak_magnitude;
|
||||
};
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
struct ff_effect {
|
||||
__u16 type;
|
||||
__s16 id;
|
||||
__u16 direction;
|
||||
__u16 type;
|
||||
__s16 id;
|
||||
__u16 direction;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
struct ff_trigger trigger;
|
||||
struct ff_replay replay;
|
||||
union {
|
||||
struct ff_constant_effect constant;
|
||||
struct ff_trigger trigger;
|
||||
struct ff_replay replay;
|
||||
union {
|
||||
struct ff_constant_effect constant;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
struct ff_ramp_effect ramp;
|
||||
struct ff_periodic_effect periodic;
|
||||
struct ff_condition_effect condition[2];
|
||||
struct ff_rumble_effect rumble;
|
||||
struct ff_ramp_effect ramp;
|
||||
struct ff_periodic_effect periodic;
|
||||
struct ff_condition_effect condition[2];
|
||||
struct ff_rumble_effect rumble;
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
} u;
|
||||
} u;
|
||||
};
|
||||
#define FF_RUMBLE 0x50
|
||||
#define FF_PERIODIC 0x51
|
||||
@@ -1064,6 +1064,6 @@ struct ff_effect {
|
||||
#define FF_GAIN 0x60
|
||||
#define FF_AUTOCENTER 0x61
|
||||
#define FF_MAX 0x7f
|
||||
#define FF_CNT (FF_MAX+1)
|
||||
#define FF_CNT (FF_MAX + 1)
|
||||
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user