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
//! # ReAI Vibe Board Hardware SDK (V2)
//!
//! English:
//! An embeddable Rust crate that encapsulates USB/BLE connectivity,
//! auto-reconnect, the HID protocol, mSBC decoding, and USB Audio capture for
//! the ReAI Vibe Board hardware family. Designed to be embedded into any host
//! application that needs to talk to the board.
//!
//! Product site: <https://b.reai.com>
//!
//! 简体中文:
//! 封装 USB/BLE 连接、断线重连、HID 协议、mSBC 解码、USB Audio 采集能力的
//! Rust crate,可嵌入任意应用。
//!
//! ## V2 Architecture (four layers)
//! - [`kernel`] — pure logic kernel (protocol / events / errors / sink / mSBC /
//! aggregator). No threads, no I/O.
//! - [`runtime`] — tokio async orchestration (device lifecycle / hotplug /
//! USB / BLE I/O)
//! - [`facade`] — `BoardDevice` high-level entry point, three event flavors
//! (`events()` / `on_event()` / `subscribe()`)
//! - [`tool`] — I/O-aware helpers (device-info parsing, mSBC file decoding)
//!
//! `runtime`/`facade` require at least one of `usb` / `ble`. With both disabled
//! only `kernel`/`tool` are available (lightweight protocol layer).
//!
//! ## Hardware targets
//! Protocol constants (USB VID/PID, BLE GATT service UUIDs, command opcodes)
//! are tuned for the **ReAI Vibe Board** hardware family. See module-level docs
//! for details; they are not generic USB/BLE abstractions.
// runtime layer requires at least one of usb / ble; with both disabled only
// kernel/tool are available (lightweight protocol layer).
// ============ Top-level re-exports ============
pub use ;
pub use FactoryKeyEvent;
pub use ;
pub use WorkMode;
pub use ;
pub use sink; // top-level re-export (consumers use reai_board_sdk::sink::PcmSink)
pub use ConnectionType;
pub use ;
pub use ;
pub use BoardDeviceBlocking;
pub use BleDeviceInfo;