1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/* automatically generated by rust-bindgen 0.58.1 */

use
super::*;

pub const I2C_M_READ: u32 = 1;
pub const I2C_M_WRITE: u32 = 0;
pub const I2C_M_BLOCK: u32 = 0;
pub const I2C_M_NO_BLOCK: u32 = 1;
pub type __uint8_t = ::cty::c_uchar;
pub type __uint16_t = ::cty::c_ushort;
pub type __uint32_t = ::cty::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct i2c_msg {
    pub addr: u16,
    pub direct: u8,
    pub subflag: u8,
    pub subaddr: u32,
    pub sublen: u8,
    pub len: u32,
    pub buf: *mut u8,
    pub event: ::cty::c_int,
    pub idex: ::cty::c_int,
    pub block: ::cty::c_int,
    pub stop: ::cty::c_int,
    pub ins_num: ::cty::c_int,
    pub i2cx: ::cty::c_int,
}
impl Default for i2c_msg {
    fn default() -> Self {
        unsafe { ::core::mem::zeroed() }
    }
}
pub type i2c_msg_t = i2c_msg;
#[safe_wrap(_)] extern "C" {
    pub fn i2c_set_freq(freq: ::cty::c_int, i2cx: ::cty::c_int);
}
#[safe_wrap(_)] extern "C" {
    pub fn i2c_gpio_init(i2cx: ::cty::c_int);
}
#[safe_wrap(_)] extern "C" {
    pub fn i2c_clear_status(i2cx: ::cty::c_int);
}
#[safe_wrap(_)] extern "C" {
    pub fn i2c_transfer_start(pstmsg: *mut i2c_msg_t);
}