Skip to main content

Crate ds2484

Crate ds2484 

Source
Expand description

§ds2484

Implementation of the embedded-onewire traits for the Analog Devices DS2484 I2C-to-1-Wire bridge device.

§Usage

Add the following to your Cargo.toml:

ds2484 = "0.0.4"

§Synchronous Operations

use ds2484::Ds2484Builder;

let mut i2c = todo!();
let delay = todo!();
let mut ds2484 = Ds2484Builder::default()
                    .build(&mut i2c, delay)
                    .expect("Could not create a DS2484 instance");

§Asynchronous Operations

use ds2484::Ds2484Builder;

let mut i2c = todo!();
let delay = todo!();
let mut ds2484 = Ds2484Builder::default()
                    .build_async(&mut i2c, delay)
                    .await
                    .expect("Could not create a DS2484 instance");

Structs§

DeviceConfiguration
Device configuration register
DeviceStatus
Status register for DS2484 The read-only Status register is the general means for the DS2484 to report bit-type data from the 1-Wire side, 1-Wire busy status, and its own reset status to the host processor (Table 3). All 1-Wire communication commands and the Device Reset command position the read pointer at the Status register for the host processor to read with minimal protocol overhead. Status information is updated during the execution of certain commands only. Bit details are given in the following descriptions.
Ds2484
A DS2484 I2C to 1-Wire bridge device.
Ds2484Builder
Builder for creating a Ds2484 instance with custom configuration.
OneWireConfigurationBuilder
Builder for configuring the 1-Wire port parameters.
OneWirePortConfiguration
1-Wire port parameters.

Enums§

Ds2484Error
DS2484 Hardware Errors
OneWireError
One wire communication error type.

Traits§

Interact
Trait for interacting with the DS2484 I2C 1-Wire master.
InteractAsync
Trait for interacting with the DS2484 I2C 1-Wire master asynchronously.
OneWire
Trait for 1-Wire communication. This trait defines the basic operations required for 1-Wire communication, such as resetting the bus, writing and reading bytes, and writing and reading bits.
OneWireAsync
Trait for 1-Wire communication. This trait defines the basic operations required for 1-Wire communication, such as resetting the bus, writing and reading bytes, and writing and reading bits.

Type Aliases§

Ds2484Result
Results of DS2484-specific function calls.
OneWireResult
Error type for 1-Wire operations.