Open FFBoard
Open source force feedback firmware
ButtonSources.cpp
Go to the documentation of this file.
1/*
2 * ButtonSources.cpp
3 *
4 * Created on: Apr 18, 2024
5 * Author: Yannick
6 */
7#include "constants.h"
8#include "SPIButtons.h"
9#include "CanButtons.h"
10#include "LocalButtons.h"
11#include <ShifterAnalog.h>
12#include "PCF8574.h"
13
14#ifndef BUTTONSOURCES_DEFAULT_OVERRIDE
15// Register possible button sources (id 0-15)
16const std::vector<class_entry<ButtonSource>> ButtonSource::all_buttonsources =
17{
18#ifdef LOCALBUTTONS
19 add_class<LocalButtons,ButtonSource>(0),
20#endif
21#ifdef SPIBUTTONS
22 add_class<SPI_Buttons_1,ButtonSource>(1),
23#endif
24#ifdef SPIBUTTONS2
25 add_class<SPI_Buttons_2,ButtonSource>(2),
26#endif
27#ifdef SHIFTERBUTTONS
28 add_class<ShifterAnalog,ButtonSource>(3),
29#endif
30#ifdef PCF8574BUTTONS
31 add_class<PCF8574Buttons,ButtonSource>(4),
32#endif
33#ifdef CANBUTTONS
34 add_class<CanButtons,ButtonSource>(5),
35#endif
36};
37#endif
static const std::vector< class_entry< ButtonSource > > all_buttonsources
Definition: ButtonSource.h:33