bl602-sdk 0.0.6

Rust Wrapper for BL602 IoT SDK
Documentation
/* 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);
}