- Dual-Core Architecture: Dedicated 1000Hz USB gaming pipeline on Core 1 and BLE/Wi-Fi/Web telemetry on Core 0. - Multi-Input BLE Host: Parsers for Xbox Wireless, Google Stadia, 8BitDo (Ultimate/Pro2/SN30), and Generic HOGP gamepads. - Multi-Console USB Emulation: Nintendo Switch, PC DirectInput, PS3, PS4, Xbox 360 (libxsm3 cryptographic challenge-response), Original Xbox, and Couch Mouse/Keyboard. - Onboard Web Portal & Captive Portal: Real-time SVG gamepad visualizer, stick deadzone calibration, button combo remapping, and Wi-Fi manager. - Low-Latency Radio Management: Interactive SoftAP toggle to drop to 0-latency gaming mode. - Dual OTA Firmware Flashing: Browser-based wireless firmware updater and automated Python OTA script. - Strict Build Quality: Clean build under -Wall -Wextra with zero warnings or errors. - Versioning & Licensing: Semantic Versioning v1.0.0 and GNU GPLv3 with Commercial Restrictions.
53 lines
1.3 KiB
C
53 lines
1.3 KiB
C
#pragma once
|
|
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
#include "esp_err.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef enum {
|
|
LED_STATE_OFF,
|
|
LED_STATE_SCANNING, /* Yellow flashing */
|
|
LED_STATE_MODE_SWITCHING, /* Quick white pulses */
|
|
LED_STATE_CONFIG_PORTAL, /* Pulsating Magenta/Purple for Wi-Fi AP Config Mode */
|
|
LED_STATE_SWITCH_MODE, /* Solid / pulsating Green */
|
|
LED_STATE_PC_MODE, /* Solid / pulsating Blue */
|
|
LED_STATE_PS3_MODE, /* Solid / pulsating Red */
|
|
LED_STATE_XBOX360_MODE, /* Solid Emerald / Lime Green */
|
|
LED_STATE_XBOXOG_MODE, /* Solid Amber / Orange */
|
|
LED_STATE_PS4_MODE, /* Solid Royal Blue / Indigo */
|
|
LED_STATE_MOUSE_KB_MODE, /* Solid Turquoise / Teal */
|
|
} led_status_mode_t;
|
|
|
|
/**
|
|
* @brief Initialize the onboard WS2812 RGB LED (GPIO21).
|
|
*/
|
|
esp_err_t status_led_init(void);
|
|
|
|
/**
|
|
* @brief Set current LED status mode.
|
|
*/
|
|
void status_led_set_mode(led_status_mode_t mode);
|
|
|
|
/**
|
|
* @brief Set LED brightness (0 - 100%).
|
|
*/
|
|
void status_led_set_brightness(uint8_t percent);
|
|
|
|
/**
|
|
* @brief Get current LED brightness (0 - 100%).
|
|
*/
|
|
uint8_t status_led_get_brightness(void);
|
|
|
|
/**
|
|
* @brief Flash a specific RGB color for a given duration (in ms).
|
|
*/
|
|
void status_led_flash_color(uint8_t r, uint8_t g, uint8_t b, uint32_t duration_ms);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|