neurosky 0.0.1

Rust library and TUI for NeuroSky MindWave EEG headsets via the ThinkGear serial protocol
Documentation
//! # 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 |

pub mod types;
pub mod parser;
pub mod device;
pub mod dsp;
pub mod verify;
pub mod sandbox;
pub mod error;

/// Convenience re-exports.
pub mod prelude {
    pub use crate::error::NeuroSkyError;
    pub use crate::types::*;
    pub use crate::parser::Parser;
    pub use crate::device::MindWaveDevice;
    pub use crate::dsp::{BandPowerExtractor, BandPowers};
    pub use crate::verify::{verify_packet, make_packet};
    pub use crate::sandbox::block_internet;
}