Papageno
An Advanced Pattern Matching Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
ppg_input.h
Go to the documentation of this file.
1 /* Copyright 2017 noseglasses <shinynoseglasses@gmail.com>
2  *
3  * This program is free software: you can redistribute it and/or modify
4  * it under the terms of the GNU Lesser General Public License as published by
5  * the Free Software Foundation, either version 3 of the License, or
6  * (at your option) any later version.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 #ifndef PPG_INPUT_H
18 #define PPG_INPUT_H
19 
22 #include <stdbool.h>
23 #include <stdint.h>
24 
29 typedef uint8_t PPG_Input_Id;
30 
36 #define PPG_INPUTS(...) \
37  sizeof((PPG_Input_Id[]){ __VA_ARGS__ })/sizeof(PPG_Input_Id), \
38  \
39  /* The following akward construnct serves to silence the compiler warning \
40  * error: taking address of temporary array \
41  */ \
42  (PPG_Input_Id*)(const PPG_Input_Id[]){ __VA_ARGS__ }
43 
44 #endif
uint8_t PPG_Input_Id
The type used as input identifier.
Definition: ppg_input.h:29