![]() |
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 <set>#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... | |
| struct | uint128_t |
| 128-bit integer More... | |
| struct | InputNumber |
| Firmware-defined input numbers in the range [0,127] or unspecified. More... | |
| struct | InputNumberCombination |
| Combination of input numbers. 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... | |
| struct | Pixel |
| Pixel in 3-byte packed RGB format. 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::set< GPIO > | GPIOCollection |
| Collection of GPIOs. | |
| typedef std::set< InputGPIO > | InputGPIOCollection |
| Collection of input GPIOs. | |
| typedef std::set< 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 , APA106 } |
| Pixel driver. More... | |
| enum class | PixelFormat : unsigned char { RGB = 0 , RBG , GRB , GBR , BRG , BGR } |
| Byte order of pixel data starting with the least significant byte. More... | |
Functions | |
| int | map_value (int x, int in_min, int in_max, int out_min, int out_max) |
| Equivalent to Arduino's map() | |
| constexpr uint128_t | operator<< (const uint128_t &source, ::std::size_t n) noexcept |
| Shift left. | |
| constexpr uint128_t | operator>> (const uint128_t &source, ::std::size_t n) noexcept |
| Shift right. | |
| constexpr uint128_t | operator| (uint128_t a, uint128_t b) noexcept |
| Bitwise OR. | |
| constexpr uint128_t | operator& (uint128_t a, uint128_t b) noexcept |
| Bitwise AND. | |
| constexpr uint128_t | operator^ (uint128_t a, uint128_t b) noexcept |
| Bitwise XOR. | |
| constexpr uint128_t | operator~ (uint128_t a) noexcept |
| Bitwise negation. | |
| constexpr bool | operator== (uint128_t a, uint128_t b) noexcept |
| Check equality. | |
| constexpr bool | operator!= (uint128_t a, uint128_t b) |
| Check inequality. | |
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 807 of file SimWheelTypes.hpp.
| #define JOY_B 1 |
Game pad button "B".
Definition at line 808 of file SimWheelTypes.hpp.
| #define JOY_BACK 6 |
Game pad back button.
Definition at line 815 of file SimWheelTypes.hpp.
| #define JOY_LB 4 |
Game pad left shoulder button.
Definition at line 811 of file SimWheelTypes.hpp.
| #define JOY_LSHIFT_PADDLE 4 |
Left shift paddle.
Definition at line 813 of file SimWheelTypes.hpp.
| #define JOY_LTHUMBSTICK_CLICK 8 |
Game pad left thumb stick click button.
Definition at line 817 of file SimWheelTypes.hpp.
| #define JOY_RB 5 |
Game pad right shoulder button.
Definition at line 812 of file SimWheelTypes.hpp.
| #define JOY_RSHIFT_PADDLE 5 |
Right shift paddle.
Definition at line 814 of file SimWheelTypes.hpp.
| #define JOY_RTHUMBSTICK_CLICK 9 |
Game pad right thumb stick click button.
Definition at line 818 of file SimWheelTypes.hpp.
| #define JOY_START 7 |
Game pad start button.
Definition at line 816 of file SimWheelTypes.hpp.
| #define JOY_X 2 |
Game pad button "X".
Definition at line 809 of file SimWheelTypes.hpp.
| #define JOY_Y 3 |
Game pad button "Y".
Definition at line 810 of file SimWheelTypes.hpp.
| typedef std::set<GPIO> GPIOCollection |
Collection of GPIOs.
Definition at line 1073 of file SimWheelTypes.hpp.
| typedef std::set<InputGPIO> InputGPIOCollection |
Collection of input GPIOs.
Definition at line 1075 of file SimWheelTypes.hpp.
| typedef std::set<OutputGPIO> OutputGPIOCollection |
Collection of output GPIOs.
Definition at line 1077 of file SimWheelTypes.hpp.
|
strong |
Connectivity choice.
Definition at line 1125 of file SimWheelTypes.hpp.
|
strong |
I2C bus controller.
Definition at line 1095 of file SimWheelTypes.hpp.
|
strong |
Pixel driver.
| Enumerator | |
|---|---|
| WS2811 | WS2811 driver. |
| WS2812 | WS2812 family. |
| WS2815 | WS2815 family. |
| SK6812 | SK6812 driver. |
| UCS1903 | UCS1903 driver. |
| APA106 | APA106 driver. |
Definition at line 1163 of file SimWheelTypes.hpp.
|
strong |
Byte order of pixel data starting with the least significant byte.
| Enumerator | |
|---|---|
| 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 1307 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 1149 of file SimWheelTypes.hpp.
|
strong |
Supported power latch modes.
Definition at line 1110 of file SimWheelTypes.hpp.
|
strong |
Unspecified value type.
| Enumerator | |
|---|---|
| VALUE | Unspecified value. |
Definition at line 188 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 170 of file SimWheelTypes.hpp.
Check inequality.
| a | Left operand |
| b | Right operand |
Definition at line 483 of file SimWheelTypes.hpp.
Bitwise AND.
| a | Left operand |
| b | Right operand |
Definition at line 425 of file SimWheelTypes.hpp.
Shift left.
| source | Bitmap |
| n | Count of bits to shift |
Definition at line 346 of file SimWheelTypes.hpp.
Check equality.
| a | Left operand |
| b | Right operand |
Definition at line 470 of file SimWheelTypes.hpp.
Shift right.
| source | Bitmap |
| n | Count of bits to shift |
Definition at line 378 of file SimWheelTypes.hpp.
Bitwise XOR.
| a | Left operand |
| b | Right operand |
Definition at line 440 of file SimWheelTypes.hpp.
Bitwise OR.
| a | Left operand |
| b | Right operand |
Definition at line 410 of file SimWheelTypes.hpp.
Bitwise negation.
| a | Operand |
Definition at line 454 of file SimWheelTypes.hpp.