![]() |
OpenSourceSimWheelESP32
Open-source wireless steering wheel/button box for ESP32 boards
|
Types and constants required for custom firmware setup. More...
#include <cstdint>#include <string>#include <stdexcept>#include <vector>#include <initializer_list>#include <map>#include <algorithm>#include "driver/rtc_io.h"#include "hal/gpio_types.h"#include "driver/gpio.h"#include "esp32-hal-psram.h"Go to the source code of this file.
Classes | |
| class | invalid_input_number |
| Exception for invalid input numbers. More... | |
| class | gpio_error |
| Exception for invalid GPIO pin numbers. More... | |
| class | empty_input_number_set |
| Exception for empty input number specifications. More... | |
| class | unknown_input_number |
| Exception for unknown input numbers. More... | |
| class | invalid_user_input_number |
| Exception for invalid user-defined input numbers. More... | |
| struct | InputNumber |
| Firmware-defined input numbers in the range [0,63] or unspecified. More... | |
| class | InputNumberCombination |
| Combination of input numbers. More... | |
| struct | UserInputNumber |
| User-defined input numbers in the range [0,127]. More... | |
| struct | GPIO |
| GPIO pin number. More... | |
| struct | OutputGPIO |
| Output-capable GPIO pin number. More... | |
| struct | InputGPIO |
| Input-capable GPIO pin number. More... | |
| struct | ADC_GPIO |
| ADC-capable GPIO pin number. More... | |
| struct | RTC_GPIO |
| RTC-capable GPIO pin number. More... | |
| struct | TelemetryData |
| Telemetry data. More... | |
| class | AbstractUserInterface |
| Abstract interface for notifications and telemetry display. More... | |
| class | PixelControlNotification |
| Notifications using pixel control. More... | |
Macros | |
| #define | GPIO_IS_VALID_RTC_GPIO(pin) |
| Validation of RTC GPIO pins. | |
| #define | JOY_A 0 |
| Game pad button "A". | |
| #define | JOY_B 1 |
| Game pad button "B". | |
| #define | JOY_X 2 |
| Game pad button "X". | |
| #define | JOY_Y 3 |
| Game pad button "Y". | |
| #define | JOY_LB 4 |
| Game pad left shoulder button. | |
| #define | JOY_RB 5 |
| Game pad right shoulder button. | |
| #define | JOY_LSHIFT_PADDLE 4 |
| Left shift paddle. | |
| #define | JOY_RSHIFT_PADDLE 5 |
| Right shift paddle. | |
| #define | JOY_BACK 6 |
| Game pad back button. | |
| #define | JOY_START 7 |
| Game pad start button. | |
| #define | JOY_LTHUMBSTICK_CLICK 8 |
| Game pad left thumb stick click button. | |
| #define | JOY_RTHUMBSTICK_CLICK 9 |
| Game pad right thumb stick click button. | |
Typedefs | |
| typedef std::vector< GPIO > | GPIOCollection |
| Collection of GPIOs. | |
| typedef std::vector< InputGPIO > | InputGPIOCollection |
| Collection of input GPIOs. | |
| typedef std::vector< OutputGPIO > | OutputGPIOCollection |
| Collection of output GPIOs. | |
Enumerations | |
| enum class | UNSPECIFIED { VALUE = 0xFF } |
| Unspecified value type. More... | |
| enum class | I2CBus { PRIMARY = 0 , SECONDARY } |
| I2C bus controller. More... | |
| enum class | PowerLatchMode : uint8_t { POWER_OPEN_DRAIN , POWER_OFF_HIGH , POWER_OFF_LOW } |
| Supported power latch modes. More... | |
| enum class | Connectivity : uint8_t { USB_BLE = 0 , USB_BLE_EXCLUSIVE = 1 , USB = 2 , BLE = 3 , DUMMY = 4 , _DEFAULT = USB_BLE } |
| Connectivity choice. More... | |
| enum class | PixelGroup { GRP_TELEMETRY = 0 , GRP_BUTTONS , GRP_INDIVIDUAL } |
| Available RGB LED groups for pixel control. More... | |
| enum class | PixelDriver { WS2811 = 0 , WS2812 , WS2815 , SK6812 , UCS1903 } |
| Pixel driver. More... | |
| enum class | PixelFormat { AUTO = 0 , RGB , RBG , GRB , GBR , BRG , BGR } |
| Byte order of pixel data. More... | |
Functions | |
| template<typename T > | |
| bool | addIfNotExists (T item, std::vector< T > &vector) |
| Add an item to a collection without duplicates. | |
| int | map_value (int x, int in_min, int in_max, int out_min, int out_max) |
| Equivalent to Arduino's map() | |
Types and constants required for custom firmware setup.
Definition in file SimWheelTypes.hpp.
| #define GPIO_IS_VALID_RTC_GPIO | ( | pin | ) |
Validation of RTC GPIO pins.
Definition at line 35 of file SimWheelTypes.hpp.
| #define JOY_A 0 |
Game pad button "A".
Definition at line 491 of file SimWheelTypes.hpp.
| #define JOY_B 1 |
Game pad button "B".
Definition at line 492 of file SimWheelTypes.hpp.
| #define JOY_BACK 6 |
Game pad back button.
Definition at line 499 of file SimWheelTypes.hpp.
| #define JOY_LB 4 |
Game pad left shoulder button.
Definition at line 495 of file SimWheelTypes.hpp.
| #define JOY_LSHIFT_PADDLE 4 |
Left shift paddle.
Definition at line 497 of file SimWheelTypes.hpp.
| #define JOY_LTHUMBSTICK_CLICK 8 |
Game pad left thumb stick click button.
Definition at line 501 of file SimWheelTypes.hpp.
| #define JOY_RB 5 |
Game pad right shoulder button.
Definition at line 496 of file SimWheelTypes.hpp.
| #define JOY_RSHIFT_PADDLE 5 |
Right shift paddle.
Definition at line 498 of file SimWheelTypes.hpp.
| #define JOY_RTHUMBSTICK_CLICK 9 |
Game pad right thumb stick click button.
Definition at line 502 of file SimWheelTypes.hpp.
| #define JOY_START 7 |
Game pad start button.
Definition at line 500 of file SimWheelTypes.hpp.
| #define JOY_X 2 |
Game pad button "X".
Definition at line 493 of file SimWheelTypes.hpp.
| #define JOY_Y 3 |
Game pad button "Y".
Definition at line 494 of file SimWheelTypes.hpp.
| typedef std::vector<GPIO> GPIOCollection |
Collection of GPIOs.
Definition at line 850 of file SimWheelTypes.hpp.
| typedef std::vector<InputGPIO> InputGPIOCollection |
Collection of input GPIOs.
Definition at line 852 of file SimWheelTypes.hpp.
| typedef std::vector<OutputGPIO> OutputGPIOCollection |
Collection of output GPIOs.
Definition at line 854 of file SimWheelTypes.hpp.
|
strong |
Connectivity choice.
Definition at line 902 of file SimWheelTypes.hpp.
|
strong |
I2C bus controller.
Definition at line 872 of file SimWheelTypes.hpp.
|
strong |
Pixel driver.
| Enumerator | |
|---|---|
| WS2811 | WS2811 driver. |
| WS2812 | WS2812 family. |
| WS2815 | WS2815 family. |
| SK6812 | SK6812 driver. |
| UCS1903 | UCS1903 driver. |
Definition at line 940 of file SimWheelTypes.hpp.
|
strong |
Byte order of pixel data.
| Enumerator | |
|---|---|
| AUTO | Auto-detect based on pixel driver. |
| RGB | Red-green-blue. |
| RBG | Red-blue-green. |
| GRB | Green-red-blue. |
| GBR | Green-blue-red. |
| BRG | Blue-red-green. |
| BGR | Blue-green-red. |
Definition at line 958 of file SimWheelTypes.hpp.
|
strong |
Available RGB LED groups for pixel control.
| Enumerator | |
|---|---|
| GRP_TELEMETRY | Telemetry leds group. |
| GRP_BUTTONS | Buttons lighting group. |
| GRP_INDIVIDUAL | Individual leds group. |
Definition at line 926 of file SimWheelTypes.hpp.
|
strong |
Supported power latch modes.
Definition at line 887 of file SimWheelTypes.hpp.
|
strong |
Unspecified value type.
| Enumerator | |
|---|---|
| VALUE | Unspecified value. |
Definition at line 236 of file SimWheelTypes.hpp.
| bool addIfNotExists | ( | T | item, |
| std::vector< T > & | vector ) |
Add an item to a collection without duplicates.
| T | Item class |
| item | Item to be added |
| vector | Collection |
Definition at line 199 of file SimWheelTypes.hpp.
|
inline |
Equivalent to Arduino's map()
| x | Input value |
| in_min | Input min value |
| in_max | Input max value |
| out_min | Output min value |
| out_max | Output max value |
Definition at line 218 of file SimWheelTypes.hpp.