Expand description
§xbox-controller-core
An allocation-free, no_std parser for Xbox Wireless Controller BLE input
reports. It contains no ESP, Embassy, operating-system, or Bluetooth-stack
dependencies.
use xbox_controller_core::parse_input_report;
fn consume(bytes: &[u8]) -> Result<(), xbox_controller_core::ParseError> {
let state = parse_input_report(bytes)?;
// Use state.buttons, state.sticks, and state.triggers.
Ok(())
}Use the separate esp-xbox-controller crate when you also want ESP32 BLE
scanning, pairing, HID discovery, keepalives, and reconnection management.
Structs§
- Xbox
Button State - Digital button state from one Xbox controller report.
- Xbox
Controller State - The controller state represented by one BLE HID input notification.
- Xbox
Sticks - Stick positions centered around zero.
- Xbox
Triggers - Analog trigger values, normally in the range
0..=1023.
Enums§
- Parse
Error - An error encountered while parsing an Xbox input notification.
Constants§
- INPUT_
REPORT_ LEN - Length of the currently supported Xbox Series input report.
Functions§
- parse_
input_ report - Parse an Xbox Series controller BLE input notification.