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:
@ -24,9 +24,14 @@
|
||||
#define ULTRALCD_H
|
||||
|
||||
#include "Marlin.h"
|
||||
|
||||
#if ENABLED(ULTRA_LCD)
|
||||
|
||||
#include "buzzer.h"
|
||||
|
||||
#define BUTTON_EXISTS(BN) (defined(BTN_## BN) && BTN_## BN >= 0)
|
||||
#define BUTTON_PRESSED(BN) !READ(BTN_## BN)
|
||||
|
||||
int lcd_strlen(const char* s);
|
||||
int lcd_strlen_P(const char* s);
|
||||
void lcd_update();
|
||||
|
Reference in New Issue
Block a user