Boolean flags moved into one register
Size optimization enabled
This commit is contained in:
@@ -95,6 +95,7 @@
|
||||
#define BUTTON_CLEAN_THR 30 // button threshold for cleaning mode (ms)
|
||||
#define BUTTON_THRESHOLD 100 // button threshold (ms)
|
||||
#define BUTTON_LONG_THR 1500 // button threshold for long time push (ms)
|
||||
#define BUTTON_LIMIT 1600
|
||||
|
||||
#define RED 0b00000001
|
||||
#define RED_BLINK 0b00000010
|
||||
@@ -107,9 +108,14 @@
|
||||
#define VIOLET 0b00010001
|
||||
#define VIOLET_BLINK 0b00100010
|
||||
|
||||
#define FLAG_WATER 0
|
||||
#define FLAG_TEMPERATURE 1
|
||||
#define FLAG_CLEAN 2
|
||||
#define FLAG_ESC 3
|
||||
|
||||
// prototypes:
|
||||
void init (); // initialization
|
||||
void power_off (); // power off to sleep mode
|
||||
bool get_water (); // update water state
|
||||
bool get_temperature (); // update tehmerature state
|
||||
void get_water (); // update water state
|
||||
void get_temperature (); // update tehmerature state
|
||||
unsigned int detect_zero_crossing (); // detect zero crossing
|
||||
|
Reference in New Issue
Block a user