pub fn new(sensor_count: usize) -> Result<Self, Error> {
        let mut spi = try!(Spidev::open("/dev/spidev0.0"));
        let mut options = SpidevOptions::new();

        options.bits_per_word(8)
            .max_speed_hz(20_000)
            .mode(SPI_MODE_0);

        try!(spi.configure(&options));

        let o = Octasonic { spi: spi };

        o.set_sensor_count(sensor_count as u8);

        Ok(o)
    }
/// Create an Octasonic struct for the specified sensor count
Create an Octasonic struct for the specified sensor count
Create an Octasonic struct for the specified sensor count
pub fn new(sensor_count: usize) -> Result<Self, Error> {
        let mut spi = try!(Spidev::open("/dev/spidev0.0"));
        let mut options = SpidevOptions::new();
        options.bits_per_word(8)
            .max_speed_hz(20_000)
            .mode(SPI_MODE_0);
        try!(spi.configure(&options));
        let o = Octasonic { spi: spi };
        o.set_sensor_count(sensor_count as u8);
        Ok(o)
    }
pub fn new ( sensor_count : usize ) -> Result < Self , Error > { let mut spi = try ! ( Spidev open ( " " ) ) ; let mut options = SpidevOptions :: new ( ) ; options . bits_per_word ( 8 ) . max_speed_hz ( 20_000 ) . mode ( SPI_MODE_0 ) ; try ! ( spi configure ( options ) ) ; let o = Octasonic { spi : spi } ; o . set_sensor_count ( sensor_count as u8 ) ; Ok ( o ) }
Create an Octasonic struct for the specified sensor count
Create an Octasonic struct for the specified sensor count
sensor_count
usize
sensor_count
usize