ltr_329/lib.rs
1#![cfg_attr(not(test), no_std)]
2//! A driver for the LTR329 Ambient Light Sensor (ALS).
3//!
4//! The data sheet for the LTR329 can be found [here](https://optoelectronics.liteon.com/upload/download/DS86-2014-0006/LTR-329ALS-01_DS_V1.8.PDF)
5//!
6//! The flowchart below is based on the flowchart in Section 9 of the LTR329 datasheet
7//! and outlies the general operation of the chip.
8//! ```text
9//! Device Power Up
10//! │
11//! ▼
12//! Wait 100 ms
13//! │
14//! ▼
15//! DLS Active
16//! │
17//! ▼
18//! Wait 10 ms
19//! │
20//! ▼
21//! Check Status Reg (0x8C) ◄─┐
22//! │ │
23//! ▼ │
24//! New Data? ──── No ─────┘
25//! │ │
26//! Yes │
27//! │ │
28//! ▼ │
29//! Read ALS data │
30//! │ │
31//! ▼ │
32//! Take MCU Actions ─────┘
33//! ```
34
35pub mod ltr_329;