File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change 99//! # i2cdev
1010//!
1111//! The `i2cdev` crate provides a safe interface for interface
12- //! with i2c devices under Linux. The API wraps the Linux
13- //! kernel interface for interacting with i2c in userspace:
14- //! https://www.kernel.org/doc/Documentation/i2c/dev-interface
12+ //! with i2c devices under Linux. The API wraps the [Linux
13+ //! kernel interface for interacting with i2c in userspace][kernel-doc].
14+ //!
15+ //! [kernel-doc]: https://www.kernel.org/doc/Documentation/i2c/dev-interface
16+ //!
17+ //! ## Examples
18+ //!
19+ //! ### Using the SMBus methods to read from a Wii Nunchuk
1520//! ```rust,no_run
1621//! extern crate i2cdev;
1722//!
4247//! }
4348//! ```
4449//!
50+ //! ### Using the `transfer` API with an individual device
4551//! ```rust,no_run
4652//! extern crate i2cdev;
4753//!
48- //! use std::thread;
49- //! use std::time::Duration;
50- //!
5154//! use i2cdev::core::*;
5255//! use i2cdev::linux::{LinuxI2CDevice, LinuxI2CError, LinuxI2CMessage};
5356//!
6871//! }
6972//! ```
7073//!
74+ //! ### Using `transfer` with `LinuxI2CBus`
7175//! ```rust,no_run
7276//! extern crate i2cdev;
7377//!
74- //! use std::thread;
75- //! use std::time::Duration;
76- //!
7778//! use i2cdev::core::*;
7879//! use i2cdev::linux::{LinuxI2CBus, LinuxI2CError, LinuxI2CMessage};
7980//!
You can’t perform that action at this time.
0 commit comments