pub fn new(path: &str, frequency: u32) -> Result<Self, i32> {
        //  Open the NuttX Device Path (e.g. "/dev/i2c0") for read-write
        let fd = open(path, O_RDWR);
        if fd < 0 { return Err(fd) }

        //  Return the I2C Bus
        Ok(Self { fd, frequency })
    }
/// Create an I2C Bus from a Device Path (e.g. "/dev/i2c0")
Create an I2C Bus from a Device Path
Create an I2C Bus from a Device Path
pub fn new(path: &str, frequency: u32) -> Result<Self, i32> {
        //  Open the NuttX Device Path (e.g. "/dev/i2c0") for read-write
        let fd = open(path, O_RDWR);
        if fd < 0 { return Err(fd) }
        //  Return the I2C Bus
        Ok(Self { fd, frequency })
    }
pub fn new ( path : & str , frequency : u32 ) -> Result < Self , i32 > { //  Open the NuttX Device Path (e.g. "/dev/i2c0") for read-write let fd = open ( path , O_RDWR ) ; if fd < 0 { return Err ( fd ) } //  Return the I2C Bus Ok ( Self { fd , frequency } ) }
Create an I2C Bus from a Device Path (e.g.
Create an I2C Bus from a Device Path ( e . g .
path
&str
frequency
u32
path
&str
frequency
u32