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
55
56
//! # neurosky
//!
//! Rust library and terminal UI for the **NeuroSky MindWave** EEG headset via the
//! ThinkGear serial protocol. Pure Rust — works on all OS.
//!
//! ## Quick start
//!
//! ```rust,ignore
//! use neurosky::prelude::*;
//!
//! let ports = MindWaveDevice::find()?;
//! let mut device = MindWaveDevice::open(&ports[0])?;
//! device.auto_connect()?;
//!
//! loop {
//! for packet in device.read()? {
//! match packet {
//! Packet::Attention(v) => println!("Attention: {v}"),
//! Packet::RawValue(v) => { /* feed dsp::BandPowerExtractor */ }
//! _ => {}
//! }
//! }
//! }
//! ```
//!
//! ## Module overview
//!
//! | Module | Purpose |
//! |---|---|
//! | [`types`] | ThinkGear protocol constants, packet codes, data types |
//! | [`parser`] | Stateful binary protocol parser (sync → length → payload → checksum) |
//! | [`device`] | High-level `MindWaveDevice` API |
//! | [`dsp`] | Real-time EEG DSP pipeline — notch filter, bandpass filters, band power extraction |
//! | [`verify`] | Pure-Rust SHA-256 and ThinkGear packet checksum validation |
//! | [`sandbox`] | OS-level network sandboxing (serial-only device; no network needed) |
//! | [`error`] | Error types |
//! | [`prelude`] | Convenience re-exports |
/// Convenience re-exports.