Skip to content

Commit f1c65e0

Browse files
committed
Clean up toplevel documentation
1 parent 1ed4ae2 commit f1c65e0

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/lib.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,14 @@
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
//!
@@ -42,6 +47,7 @@
4247
//! }
4348
//! ```
4449
//!
50+
//! ### Using the `transfer` API with an individual device
4551
//! ```rust,no_run
4652
//! extern crate i2cdev;
4753
//!
@@ -65,6 +71,7 @@
6571
//! }
6672
//! ```
6773
//!
74+
//! ### Using `transfer` with `LinuxI2CBus`
6875
//! ```rust,no_run
6976
//! extern crate i2cdev;
7077
//!

0 commit comments

Comments
 (0)