Improve Due SW SPI, Fysetc sanity checks, &c. (#13939)
This commit is contained in:
@ -156,9 +156,14 @@
|
||||
#define RGB_LED
|
||||
#elif ENABLED(FYSETC_MINI_12864_2_1)
|
||||
#define NEOPIXEL_LED
|
||||
#define NEOPIXEL_TYPE NEO_GRB
|
||||
#undef NEOPIXEL_TYPE
|
||||
#define NEOPIXEL_TYPE NEO_RGB
|
||||
#undef NEOPIXEL_PIXELS
|
||||
#define NEOPIXEL_PIXELS 3
|
||||
#define NEOPIXEL_BRIGHTNESS 127
|
||||
#ifndef NEOPIXEL_BRIGHTNESS
|
||||
#define NEOPIXEL_BRIGHTNESS 127
|
||||
#endif
|
||||
#define NEOPIXEL_STARTUP_TEST
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -79,3 +79,21 @@
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(FYSETC_MINI_12864_2_1)
|
||||
#define LED_CONTROL_MENU
|
||||
#define LED_USER_PRESET_STARTUP
|
||||
#define LED_COLOR_PRESETS
|
||||
#ifndef LED_USER_PRESET_RED
|
||||
#define LED_USER_PRESET_RED 255
|
||||
#endif
|
||||
#ifndef LED_USER_PRESET_GREEN
|
||||
#define LED_USER_PRESET_GREEN 128
|
||||
#endif
|
||||
#ifndef LED_USER_PRESET_BLUE
|
||||
#define LED_USER_PRESET_BLUE 0
|
||||
#endif
|
||||
#ifndef LED_USER_PRESET_BRIGHTNESS
|
||||
#define LED_USER_PRESET_BRIGHTNESS 255
|
||||
#endif
|
||||
#endif
|
||||
|
@ -1830,26 +1830,6 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#error "RGB_LED is required for FYSETC_MINI_12864 1.2 and 2.0."
|
||||
#elif EITHER(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1) && DISABLED(LED_USER_PRESET_STARTUP)
|
||||
#error "LED_USER_PRESET_STARTUP is required for FYSETC_MINI_12864 2.x displays."
|
||||
#elif ENABLED(FYSETC_MINI_12864_2_1)
|
||||
#if DISABLED(NEOPIXEL_LED)
|
||||
#error "NEOPIXEL_LED is required for FYSETC_MINI_12864 Rev. 2.1."
|
||||
#elif NEOPIXEL_PIXELS != 3
|
||||
#error "NEOPIXEL_PIXELS should be 3 for FYSETC_MINI_12864 Rev. 2.1."
|
||||
#elif NEOPIXEL_BRIGHTNESS != 127
|
||||
#error "NEOPIXEL_BRIGHTNESS should be 127 for FYSETC_MINI_12864 Rev. 2.1."
|
||||
#else
|
||||
#ifndef NEO_GRB
|
||||
#define NEO_GRB 0xFAD
|
||||
#define _UNDO_NEO_GRB
|
||||
#endif
|
||||
#if NEOPIXEL_TYPE != NEO_GRB
|
||||
#error "NEOPIXEL_TYPE should be NEO_GRB for FYSETC_MINI_12864 Rev. 2.1."
|
||||
#endif
|
||||
#ifdef _UNDO_NEO_GRB
|
||||
#undef NEO_GRB
|
||||
#undef _UNDO_NEO_GRB
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user