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

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