Apply standard pin test to buttons

This is the easiest way to make button pin testing consistent without
renaming all the button pins. Just make a macro especially for testing
if button pins are set, since they are named consistently in the pins
files.
This commit is contained in:
Scott Lahteine
2016-03-27 04:25:33 -07:00
parent f2ffc8b28b
commit f543aaa54e
5 changed files with 48 additions and 46 deletions

View File

@ -55,4 +55,6 @@
#define NUMERIC_SIGNED(a) (NUMERIC(a) || (a) == '-')
#define COUNT(a) (sizeof(a)/sizeof(*a))
#define PIN_EXISTS(PN) (defined(PN ##_PIN) && PN ##_PIN >= 0)
#endif //__MACROS_H