EX-Display
EX-Display
Loading...
Searching...
No Matches
/home/runner/work/EX-Display/EX-Display/CreateDeviceMacros.h
Go to the documentation of this file.
1/*
2 * © 2024 Peter Cole
3 *
4 * This is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * It is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this code. If not, see <https://www.gnu.org/licenses/>.
16 */
17
22#ifndef CREATEDEVICEMACROS_H
23#define CREATEDEVICEMACROS_H
24
25// Process USER_DISPLAY entries
27#undef USER_DISPLAY
28#define USER_DISPLAY(type, params...) this->addDisplay(type::create(params));
30#ifndef PIO_UNIT_TESTING
31#if __has_include("myDevices.h")
32#include "myDevices.h"
33#else
34#error No myDevices.h created, no displays or input devices available
35#endif // myDevices.h
36#else
38#endif // PIO_UNIT_TESTING
39}
40
41// Process USER_INPUT entry
43#undef USER_INPUT
44#define USER_INPUT(type, params...) this->addInput(type::create(params));
46#ifndef PIO_UNIT_TESTING
47#if __has_include("myDevices.h")
48#include "myDevices.h"
49#else
50#error No myDevices.h created, no displays or input devices available
51#endif // myDevices.h
52#else
54#endif // PIO_UNIT_TESTING
55}
56
57#endif // CREATEDEVICEMACROS_H
void createDisplays()
Parses the displays configured in myConfig.h and creates the list of displays (this is implemented in...
Definition CreateDeviceMacros.h:29
void createInput()
Call once to create the InputInterface derived input.
Definition CreateDeviceMacros.h:45