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
57
58
59
60
61
62
63
64
65
66
67
68
69
//! # gtec
//!
//! Rust library and terminal UI for the **g.tec Unicorn Hybrid Black**
//! 8-channel EEG headset via the [Unicorn C API](https://github.com/unicorn-bi/Unicorn-Hybrid-Black-Windows-APIs),
//! loaded at runtime.
//!
//! ## Cross-platform
//!
//! Works on **Windows** and **Linux** (x86_64). The `Unicorn.dll` /
//! `libunicorn.so` shared library is loaded at runtime via `libloading` —
//! no build-time C dependencies.
//!
//! ## Quick start
//!
//! ```rust,ignore
//! use gtec::prelude::*;
//!
//! let serials = UnicornDevice::scan(true)?;
//! let mut device = UnicornDevice::open(&serials[0])?;
//!
//! println!("Info: {:?}", device.device_info()?);
//!
//! let scans = device.capture(UNICORN_SAMPLING_RATE * 4)?;
//! for s in &scans[..5] {
//! println!("EEG: {:?}", s.eeg());
//! }
//! ```
//!
//! ## Using as a library
//!
//! ```toml
//! [dependencies]
//! gtec = "0.0.1"
//! gtec = { version = "0.0.1", default-features = false }
//! ```
//!
//! ## Module overview
//!
//! | Module | Purpose |
//! |---|---|
//! | [`ffi`] | Runtime-loaded Unicorn C API for Hybrid Black (16/16 functions) |
//! | [`ffi_ble`] | Runtime-loaded `libgtecble` BLE API for BCI Core-8 (9/9 functions) |
//! | [`ble`] | Pure-Rust BLE backend for BCI Core-8 via `btleplug` (**all OS**, no native lib) |
//! | [`types`] | `#[repr(C)]` types matching `unicorn.h` |
//! | [`protocol`] | Pure-Rust BT protocol (Hybrid Black, no native lib needed) |
//! | [`device`] | High-level device API |
//! | [`verify`] | SHA-256 integrity verification |
//! | [`sandbox`] | OS-level network sandboxing |
//! | [`error`] | Error types |
//! | [`prelude`] | Convenience re-exports |
/// Convenience re-exports.