respeaker 0.2.0

USB control library for Seeed ReSpeaker Mic Array v2.0 and XVF3800 (LEDs + DSP tuning)
Documentation
# respeaker

Rust USB control library for Seeed ReSpeaker microphone arrays:

| Model | USB ID | Protocol |
|-------|--------|----------|
| [Mic Array v2.0]https://wiki.seeedstudio.com/ReSpeaker_Mic_Array_v2.0/ (XVF-3000) | `2886:0018` | [`pixel_ring`]https://github.com/respeaker/pixel_ring + [`tuning.py`]https://github.com/respeaker/usb_4_mic_array |
| [XVF3800]https://wiki.seeedstudio.com/respeaker_xvf3800_introduction/ | `2886:001a` | Seeed [`xvf_host.py`]https://github.com/respeaker/reSpeaker_XVF3800_USB_4MIC_ARRAY |

## Example

```rust
use respeaker::{Model, ReSpeaker};

fn main() -> respeaker::Result<()> {
    // Auto-detect first supported device (v2 or XVF3800):
    let dev = ReSpeaker::open()?;
    // Or force a model:
    // let dev = ReSpeaker::open_model(Model::Xvf3800)?;

    println!("model: {}", dev.model());
    dev.led().off()?;
    println!("DOA: {}°  voice={}", dev.tuning().doa_angle()?, dev.tuning().is_voice()?);
    Ok(())
}
```

Unified helpers (`led()`, `tuning().doa_angle()`, `is_voice()`, `version_string()`) work on both models. Model-specific APIs:

- Mic Array v2: `dev.pixel_ring()`, `tuning().read("AGCONOFF")`
- XVF3800: `dev.xvf3800()`, `tuning().read_xvf("DOA_VALUE")`, `save_configuration()`

### CLI example

```bash
cargo run --example cli -- model
cargo run --example cli -- test-all
cargo run --example cli -- --model xvf3800 led mono --color ff8800
cargo run --example cli -- --model xvf3800 led effect rainbow
cargo run --example cli -- param get DOA_VALUE
cargo run --example cli -- param set LED_COLOR 0xff8800
cargo run --example cli -- param set LED_DOA_COLOR 0x202020 0x00ff00
cargo run --example cli -- save-config
```

## Permissions (Linux)

```bash
echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="2886", ATTR{idProduct}=="0018", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="2886", ATTR{idProduct}=="001a", MODE="0666"' \
  | sudo tee /etc/udev/rules.d/60-respeaker.rules
sudo udevadm control --reload-rules && sudo udevadm trigger
```

On macOS, grant the binary access if the system claims the USB device, or run with appropriate privileges.