|
@@ -116,19 +116,19 @@ void Max7219_idle_tasks();
|
116
|
116
|
#define MAX7219_UPDATE_AXIS x // Fast line update axis for this orientation of the matrix display
|
117
|
117
|
#define MAX7219_X_LEDS 8
|
118
|
118
|
#define MAX7219_Y_LEDS (MAX7219_X_LEDS * (MAX7219_NUMBER_UNITS))
|
119
|
|
- #define XOR_7219(x, y) LEDs[x + ((MAX7219_Y_LEDS - 1 - y) & 0xF8)] ^= _BV((y & 0x7))
|
120
|
|
- #define SET_PIXEL_7219(x, y) LEDs[x + ((MAX7219_Y_LEDS - 1 - y) & 0xF8)] |= _BV((y & 0x7))
|
121
|
|
- #define CLEAR_PIXEL_7219(x, y) LEDs[x + ((MAX7219_Y_LEDS - 1 - y) & 0xF8)] &= (_BV((y & 0x7)) ^ 0xFF)
|
122
|
|
- #define BIT_7219(x, y) TEST(LEDs[x + ((MAX7219_Y_LEDS - 1 - y) & 0xF8)], (y & 0x7))
|
|
119
|
+ #define XOR_7219(x, y) LEDs[x + (y & 0xF8)] ^= _BV((y & 0x7))
|
|
120
|
+ #define SET_PIXEL_7219(x, y) LEDs[x + (y & 0xF8)] |= _BV((y & 0x7))
|
|
121
|
+ #define CLEAR_PIXEL_7219(x, y) LEDs[x + (y & 0xF8)] &= (_BV((y & 0x7)) ^ 0xFF)
|
|
122
|
+ #define BIT_7219(x, y) TEST(LEDs[x + (y & 0xF8)], (y & 0x7))
|
123
|
123
|
#define SEND_7219(R) do {for(int8_t jj = 0; jj < MAX7219_NUMBER_UNITS; jj++) Max7219(max7219_reg_digit0 + (R & 0x7), LEDs[(R & 0x7) + jj * 8]); Max7219_pulse_load(); } while (0);
|
124
|
124
|
#elif _ROT == 180
|
125
|
125
|
#define MAX7219_UPDATE_AXIS y // Fast line update axis for this orientation of the matrix display
|
126
|
126
|
#define MAX7219_Y_LEDS 8
|
127
|
127
|
#define MAX7219_X_LEDS (MAX7219_Y_LEDS * (MAX7219_NUMBER_UNITS))
|
128
|
|
- #define XOR_7219(x, y) LEDs[y + (MAX7219_X_LEDS - 1 - (x)) & 0xF8] ^= _BV((x & 0x07))
|
129
|
|
- #define SET_PIXEL_7219(x, y) LEDs[y + (MAX7219_X_LEDS - 1 - (x)) & 0xF8] |= _BV((x & 0x07))
|
130
|
|
- #define CLEAR_PIXEL_7219(x, y) LEDs[y + (MAX7219_X_LEDS - 1 - (x)) & 0xF8] &= (_BV((x & 0x07)) ^ 0xFF)
|
131
|
|
- #define BIT_7219(x, y) TEST(LEDs[y + (MAX7219_X_LEDS - 1 - (x)) & 0xF8], ((x & 0x07)))
|
|
128
|
+ #define XOR_7219(x, y) LEDs[x + (y & 0xF8)] ^= _BV((x & 0x07))
|
|
129
|
+ #define SET_PIXEL_7219(x, y) LEDs[x + (y & 0xF8)] |= _BV((x & 0x07))
|
|
130
|
+ #define CLEAR_PIXEL_7219(x, y) LEDs[x + (y & 0xF8)] &= (_BV((x & 0x07)) ^ 0xFF)
|
|
131
|
+ #define BIT_7219(x, y) TEST(LEDs[x + (y & 0xF8)], ((x & 0x07)))
|
132
|
132
|
#define SEND_7219(R) do {for(int8_t jj = 0; jj < MAX7219_NUMBER_UNITS; jj++) Max7219(max7219_reg_digit7 - (R & 0x7), LEDs[(R & 0x7) + jj * 8]); Max7219_pulse_load(); } while (0);
|
133
|
133
|
#elif _ROT == 270
|
134
|
134
|
#define MAX7219_UPDATE_AXIS x // Fast line update axis for this orientation of the matrix display
|