Start beautifying the code
* Split out SPI and display (a little) * Use more of the common Macros * Remove wasted bytes from notomono font * Create a mock "menu"
This commit is contained in:
6
macros.h
6
macros.h
@@ -43,12 +43,12 @@
|
||||
(x) |= 1u << (y); \
|
||||
} while (0)
|
||||
|
||||
#define CLEAR(x, y) \
|
||||
#define CLR(x, y) \
|
||||
do { \
|
||||
(x) &= ~(y); \
|
||||
} while (0)
|
||||
|
||||
#define CLEAR_POS(x, y) \
|
||||
#define CLR_POS(x, y) \
|
||||
do { \
|
||||
(x) &= ~(1u << (y)); \
|
||||
} while (0)
|
||||
@@ -67,7 +67,7 @@
|
||||
static_assert((clear_mask & val) == val, \
|
||||
"'value' in SET_TO() has bits set that are not in clear_mask"); \
|
||||
do { \
|
||||
CLEAR(x, clear_mask); \
|
||||
CLR(x, clear_mask); \
|
||||
SET(x, val); \
|
||||
} while (0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user