linux-rust-bindings 0.1.3

Rust structs for Linux kernel structures
Documentation
/* automatically generated by rust-bindgen 0.69.1 */

pub const HID_MAX_DESCRIPTOR_SIZE: i32 = 4096;
pub const HIDRAW_FIRST_MINOR: i32 = 0;
pub const HIDRAW_MAX_DEVICES: i32 = 64;
pub const HIDRAW_BUFFER_SIZE: i32 = 64;
pub const HID_STRING_SIZE: i32 = 256;
pub const HID_REPORT_ID_UNKNOWN: i64 = 4294967295;
pub const HID_REPORT_ID_FIRST: i32 = 256;
pub const HID_REPORT_ID_NEXT: i32 = 512;
pub const HID_REPORT_ID_MASK: i32 = 255;
pub const HID_REPORT_ID_MAX: i32 = 255;
pub const HID_REPORT_TYPE_INPUT: i32 = 1;
pub const HID_REPORT_TYPE_OUTPUT: i32 = 2;
pub const HID_REPORT_TYPE_FEATURE: i32 = 3;
pub const HID_REPORT_TYPE_MIN: i32 = 1;
pub const HID_REPORT_TYPE_MAX: i32 = 3;
pub const HID_FIELD_CONSTANT: i32 = 1;
pub const HID_FIELD_VARIABLE: i32 = 2;
pub const HID_FIELD_RELATIVE: i32 = 4;
pub const HID_FIELD_WRAP: i32 = 8;
pub const HID_FIELD_NONLINEAR: i32 = 16;
pub const HID_FIELD_NO_PREFERRED: i32 = 32;
pub const HID_FIELD_NULL_STATE: i32 = 64;
pub const HID_FIELD_VOLATILE: i32 = 128;
pub const HID_FIELD_BUFFERED_BYTE: i32 = 256;
pub const HID_MAX_MULTI_USAGES: i32 = 1024;
pub const HID_FIELD_INDEX_NONE: i64 = 4294967295;
pub const HID_VERSION: i32 = 65540;
pub const HIDDEV_FLAG_UREF: i32 = 1;
pub const HIDDEV_FLAG_REPORT: i32 = 2;
pub const HIDDEV_FLAGS: i32 = 3;
pub const hid_report_type_HID_INPUT_REPORT: hid_report_type = 0;
pub const hid_report_type_HID_OUTPUT_REPORT: hid_report_type = 1;
pub const hid_report_type_HID_FEATURE_REPORT: hid_report_type = 2;
pub const hid_report_type_HID_REPORT_TYPES: hid_report_type = 3;
pub type hid_report_type = ::core::ffi::c_uint;
pub const hid_class_request_HID_REQ_GET_REPORT: hid_class_request = 1;
pub const hid_class_request_HID_REQ_GET_IDLE: hid_class_request = 2;
pub const hid_class_request_HID_REQ_GET_PROTOCOL: hid_class_request = 3;
pub const hid_class_request_HID_REQ_SET_REPORT: hid_class_request = 9;
pub const hid_class_request_HID_REQ_SET_IDLE: hid_class_request = 10;
pub const hid_class_request_HID_REQ_SET_PROTOCOL: hid_class_request = 11;
pub type hid_class_request = ::core::ffi::c_uint;
pub type __u8 = ::core::ffi::c_uchar;
pub type __s16 = ::core::ffi::c_short;
pub type __s32 = ::core::ffi::c_int;
pub type __u32 = ::core::ffi::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hidraw_report_descriptor {
    pub size: __u32,
    pub value: [__u8; 4096usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hidraw_devinfo {
    pub bustype: __u32,
    pub vendor: __s16,
    pub product: __s16,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hiddev_event {
    pub hid: ::core::ffi::c_uint,
    pub value: ::core::ffi::c_int,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hiddev_devinfo {
    pub bustype: __u32,
    pub busnum: __u32,
    pub devnum: __u32,
    pub ifnum: __u32,
    pub vendor: __s16,
    pub product: __s16,
    pub version: __s16,
    pub num_applications: __u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hiddev_collection_info {
    pub index: __u32,
    pub type_: __u32,
    pub usage: __u32,
    pub level: __u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hiddev_string_descriptor {
    pub index: __s32,
    pub value: [::core::ffi::c_char; 256usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hiddev_report_info {
    pub report_type: __u32,
    pub report_id: __u32,
    pub num_fields: __u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hiddev_field_info {
    pub report_type: __u32,
    pub report_id: __u32,
    pub field_index: __u32,
    pub maxusage: __u32,
    pub flags: __u32,
    pub physical: __u32,
    pub logical: __u32,
    pub application: __u32,
    pub logical_minimum: __s32,
    pub logical_maximum: __s32,
    pub physical_minimum: __s32,
    pub physical_maximum: __s32,
    pub unit_exponent: __u32,
    pub unit: __u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hiddev_usage_ref {
    pub report_type: __u32,
    pub report_id: __u32,
    pub field_index: __u32,
    pub usage_index: __u32,
    pub usage_code: __u32,
    pub value: __s32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hiddev_usage_ref_multi {
    pub uref: hiddev_usage_ref,
    pub num_values: __u32,
    pub values: [__s32; 1024usize],
}