@@ -13,6 +13,13 @@ low-level system calls. The documentation for the i2cdev interace can
13
13
be found at https://www.kernel.org/doc/Documentation/i2c/dev-interface and
14
14
in the [ lm-sensors projects] ( http://www.lm-sensors.org/ ) .
15
15
16
+ Device driver developers should consider building on top of the
17
+ [ embedded-hal] ( https://crates.io/crates/embedded-hal ) traits rather than
18
+ directly coupling to this library. An implementation of those generic traits for
19
+ Linux can be found in
20
+ [ linux-embedded-hal] ( https://crates.io/crates/linux-embedded-hal ) which, at
21
+ present, uses this crate as the backend for I2C.
22
+
16
23
Example/API
17
24
-----------
18
25
@@ -21,10 +28,7 @@ Nunchuck (which has an i2c interface).
21
28
[ Go View the Example] ( https://github.com/rust-embedded/rust-i2cdev/blob/master/examples/nunchuck.rs ) .
22
29
23
30
Here's a real quick example showing the guts of how you create
24
- device and start talking to it... This device only requires basic
25
- functions (read/write) which are done via the Read/Write traits (if
26
- you actually want to use the Wii Nunchuck you should use
27
- [ ` i2cdev::sensors::nunchuck::Nunchuck ` ] [ nunchuck ] :
31
+ device and start talking to it...
28
32
29
33
``` rust,no_run,skeptic-template
30
34
extern crate i2cdev;
@@ -59,8 +63,6 @@ fn i2cfun() -> Result<(), LinuxI2CError> {
59
63
In addition to the Read/Write traits, the following methods are
60
64
available via the [ I2CDevice trait] ( https://rust-embedded.github.io/rust-i2cdev/i2cdev/core/trait.I2CDevice.html ) .
61
65
62
- [ nunchuck ] : http://rust-embedded.github.io/rust-i2cdev/i2cdev/sensors/nunchuck/struct.Nunchuck.html
63
-
64
66
Features
65
67
--------
66
68
0 commit comments