Skip to main content

Crate xbox_controller_core

Crate xbox_controller_core 

Source
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§

XboxButtonState
Digital button state from one Xbox controller report.
XboxControllerState
The controller state represented by one BLE HID input notification.
XboxSticks
Stick positions centered around zero.
XboxTriggers
Analog trigger values, normally in the range 0..=1023.

Enums§

ParseError
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.