wiimote 0.2.0

Wiimote library/driver for Rust via hidapi
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/*
    This file is part of wiimote-rs (https://codeberg.org/metamuffin/wiimote-rs)
    which is licensed under the GNU Affero General Public License (version 3); see /COPYING.
    Copyright (C) 2023 metamuffin <metamuffin@disroot.org>
*/
use wiimote::{Action, ReportingMode, Wiimote};

fn main() {
    env_logger::init_from_env("LOG");
    let w = Wiimote::open();
    w.write(Action::IRCameraEnable(None));
    w.write(Action::SpeakerMute(true));
    w.write(Action::SpeakerEnable(false));
    w.write(Action::SetReporting(ReportingMode::Buttons));
}