Struct bme280_multibus::spi::Bme280Bus[][src]

pub struct Bme280Bus<SPI, CS> { /* fields omitted */ }
Expand description

BME280 bus.

Implementations

Creates a new Bme280Bus from a SPI peripheral and a chip select digital I/O pin.

Safety

The chip select pin must be high before being passed to this function.

Example
use bme280_multibus::spi::Bme280Bus;
use embedded_hal::digital::v2::OutputPin;

pin.set_high()?;
let mut bme: Bme280Bus<_, _> = Bme280Bus::new(spi, pin);

Free the SPI bus and CS pin from the W5500.

Example
use bme280_multibus::spi::Bme280Bus;
use embedded_hal::digital::v2::OutputPin;

pin.set_high()?;
let mut bme: Bme280Bus<_, _> = Bme280Bus::new(spi, pin);
let (spi, pin) = bme.free();

Trait Implementations

BME280 bus error.

Read from the BME280. Read more

Write a single register to the BME280. Read more

Read the calibration from the chip.

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.