1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//! # AS5600 Driver
//!
//! A platform-agnostic Rust driver for the AS5600 magnetic rotary encoder,
//! based on the `embedded-hal` traits.
//!
//! The AS5600 is a contactless magnetic rotary encoder with high-resolution 12-bit
//! contactless on-axis angular position measurement over a full turn of 360°.
//!
//! ## Features
//! - Read raw and filtered angle (12-bit resolution)
//! - Configure power modes, hysteresis, and filters
//! - Read magnet status (detected, too weak, too strong)
//! - Automatic Gain Control (AGC) and Magnitude reading
//! - Programming support (ZPOS, MPOS, MANG, and permanent BURN)
//! - Mock driver for testing and simulation
//!
//! ## Example (ESP32)
//! ```rust,ignore
//! use AS5600_Driver::{AS5600Driver, AS5600Interface};
//!
//! // Setup I2C from your HAL
//! let i2c = ...;
//! let mut sensor = AS5600Driver::new(i2c);
//!
//! match sensor.read_angle() {
//! Ok(angle) => println!("Angle: {}", angle),
//! Err(e) => eprintln!("Error: {:?}", e),
//! }
//! ```
extern crate std;
// Re-exports for convenience
pub use AS5600Driver;
pub use AS56Error;
pub use *;
pub use AS5600Interface;
pub use *;
pub use AS56Mock;