Logic_library
Library for Logic board by RoboticsBrno.
Loading...
Searching...
No Matches
2_0.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <array>
4#include <driver/gpio.h>
5
6enum ButtonID {
7 L_Enter = 0,
18
19 // Shadow ids for backwards compatibility with 1.x examples
20 Enter [[deprecated]] = 0,
21 Up [[deprecated]] = 1,
22 Down [[deprecated]] = 2,
23 Left [[deprecated]] = 3,
24 Right [[deprecated]] = 4,
25};
26
27namespace Platform {
28
29static constexpr bool AdjustableBuzzer = true;
30static constexpr bool LedPowerOnLevel = 1;
31
32namespace Pins {
33
34namespace LeftArrows {
35static constexpr gpio_num_t Up = GPIO_NUM_47;
36static constexpr gpio_num_t Down = GPIO_NUM_7;
37static constexpr gpio_num_t Left = GPIO_NUM_1;
38static constexpr gpio_num_t Right = GPIO_NUM_6;
39static constexpr gpio_num_t Enter = GPIO_NUM_5;
40} // namespace LeftArrows
41
42namespace RightArrows {
43static constexpr gpio_num_t Up = GPIO_NUM_8;
44static constexpr gpio_num_t Down = GPIO_NUM_14;
45static constexpr gpio_num_t Left = GPIO_NUM_10;
46static constexpr gpio_num_t Right = GPIO_NUM_4;
47static constexpr gpio_num_t Enter = GPIO_NUM_9;
48} // namespace RightArrows
49
50static constexpr gpio_num_t Display = GPIO_NUM_45;
51static constexpr gpio_num_t Status = GPIO_NUM_46;
52
53static constexpr gpio_num_t Buzzer = GPIO_NUM_21;
54
55static constexpr gpio_num_t LedPower = GPIO_NUM_0;
56
57static constexpr std::array<gpio_num_t, MaxID> Buttons = {
63
69};
70
71} // namespace Pins
72
73} // namespace Platform
ButtonID
Definition: 1_1.hpp:6
@ L_Right
Definition: 2_0.hpp:11
@ R_Down
Definition: 2_0.hpp:14
@ L_Enter
Definition: 2_0.hpp:7
@ L_Up
Definition: 2_0.hpp:8
@ L_Down
Definition: 2_0.hpp:9
@ Up
Definition: 2_0.hpp:21
@ Enter
Definition: 2_0.hpp:20
@ R_Up
Definition: 2_0.hpp:13
@ R_Enter
Definition: 2_0.hpp:12
@ MaxID
Definition: 2_0.hpp:17
@ R_Right
Definition: 2_0.hpp:16
@ Left
Definition: 2_0.hpp:23
@ Down
Definition: 2_0.hpp:22
@ R_Left
Definition: 2_0.hpp:15
@ Right
Definition: 2_0.hpp:24
@ L_Left
Definition: 2_0.hpp:10
Definition: Buttons.hpp:17
Definition: Buzzer.hpp:10
Definition: Display.hpp:28
static constexpr gpio_num_t Up
Definition: 2_0.hpp:35
static constexpr gpio_num_t Left
Definition: 2_0.hpp:37
static constexpr gpio_num_t Enter
Definition: 2_0.hpp:39
static constexpr gpio_num_t Down
Definition: 2_0.hpp:36
static constexpr gpio_num_t Right
Definition: 2_0.hpp:38
static constexpr gpio_num_t Up
Definition: 2_0.hpp:43
static constexpr gpio_num_t Right
Definition: 2_0.hpp:46
static constexpr gpio_num_t Left
Definition: 2_0.hpp:45
static constexpr gpio_num_t Enter
Definition: 2_0.hpp:47
static constexpr gpio_num_t Down
Definition: 2_0.hpp:44
static constexpr gpio_num_t Status
Definition: 1_1.hpp:42
static constexpr gpio_num_t LedPower
Definition: 1_1.hpp:46
Definition: 1_1.hpp:19
static constexpr bool LedPowerOnLevel
Definition: 1_1.hpp:22
static constexpr bool AdjustableBuzzer
Definition: 1_1.hpp:21