Clean up after changes
This commit is contained in:
parent
d20d459132
commit
bc688f27dc
|
@ -2142,6 +2142,7 @@
|
|||
|
||||
//
|
||||
// FSMC display (MKS Robin, Alfawise U20, JGAurora A5S, REXYZ A1, etc.)
|
||||
// Upscaled 128x64 Marlin UI
|
||||
//
|
||||
//#define FSMC_GRAPHICAL_TFT
|
||||
|
||||
|
@ -2149,17 +2150,11 @@
|
|||
// TFT LVGL UI
|
||||
//
|
||||
// Using default MKS icons and fonts from: https://git.io/JJvzK
|
||||
// Just copy the `assets` folder from the build directory to the
|
||||
// Just copy the 'assets' folder from the build directory to the
|
||||
// root of your SD card, together with the compiled firmware.
|
||||
//
|
||||
// Robin nano v1.2 uses FSMC
|
||||
//
|
||||
//#define TFT_LVGL_UI_FSMC
|
||||
|
||||
// Robin nano v2.0 uses SPI
|
||||
//
|
||||
//#define TFT_LVGL_UI_SPI
|
||||
|
||||
//#define TFT_LVGL_UI_FSMC // Robin nano v1.2 uses FSMC
|
||||
//#define TFT_LVGL_UI_SPI // Robin nano v2.0 uses SPI
|
||||
|
||||
//=============================================================================
|
||||
//============================ Other Controllers ============================
|
||||
|
|
|
@ -63,7 +63,7 @@ uint16_t HAL_adc_result;
|
|||
void HAL_init() {
|
||||
FastIO_init();
|
||||
|
||||
#if ENABLED(SDSUPPORT)
|
||||
#if ENABLED(SDSUPPORT) && DISABLED(SDIO_SUPPORT)
|
||||
OUT_WRITE(SDSS, HIGH); // Try to set SDSS inactive before any other SPI users start up
|
||||
#endif
|
||||
|
||||
|
|
|
@ -41,8 +41,7 @@
|
|||
}
|
||||
|
||||
bool SDIO_Init() {
|
||||
if (hsd.State == HAL_SD_STATE_READY) return 1; // return passing status
|
||||
return 0; // return failing status
|
||||
return hsd.State == HAL_SD_STATE_READY; // return pass/fail status
|
||||
}
|
||||
|
||||
bool SDIO_ReadBlock(uint32_t block, uint8_t *src) {
|
||||
|
@ -58,7 +57,6 @@
|
|||
#else // !USBD_USE_CDC_COMPOSITE
|
||||
|
||||
// use local drivers
|
||||
|
||||
#if defined(STM32F103xE) || defined(STM32F103xG)
|
||||
#include <stm32f1xx_hal_rcc_ex.h>
|
||||
#include <stm32f1xx_hal_sd.h>
|
||||
|
@ -274,7 +272,6 @@
|
|||
bool SDIO_WriteBlock(uint32_t block, const uint8_t *src) {
|
||||
hsd.Instance = SDIO;
|
||||
uint8_t retryCnt = SD_RETRY_COUNT;
|
||||
|
||||
bool status;
|
||||
for (;;) {
|
||||
status = (bool) HAL_SD_WriteBlocks(&hsd, (uint8_t*)src, block, 1, 500); // write one 512 byte block with 500mS timeout
|
||||
|
|
|
@ -64,12 +64,14 @@ void FastIO_init(); // Must be called before using fast io macros
|
|||
#define _GET_MODE(IO)
|
||||
#define _SET_MODE(IO,M) pinMode(IO, M)
|
||||
#define _SET_OUTPUT(IO) pinMode(IO, OUTPUT) /*!< Output Push Pull Mode & GPIO_NOPULL */
|
||||
#define _SET_OUTPUT_OD(IO) pinMode(IO, OUTPUT_OPEN_DRAIN)
|
||||
|
||||
#define WRITE(IO,V) _WRITE(IO,V)
|
||||
#define READ(IO) _READ(IO)
|
||||
#define TOGGLE(IO) _TOGGLE(IO)
|
||||
|
||||
#define OUT_WRITE(IO,V) do{ _SET_OUTPUT(IO); WRITE(IO,V); }while(0)
|
||||
#define OUT_WRITE_OD(IO,V) do{ _SET_OUTPUT_OD(IO); WRITE(IO,V); }while(0)
|
||||
|
||||
#define SET_INPUT(IO) _SET_MODE(IO, INPUT) /*!< Input Floating Mode */
|
||||
#define SET_INPUT_PULLUP(IO) _SET_MODE(IO, INPUT_PULLUP) /*!< Input with Pull-up activation */
|
||||
|
|
|
@ -27,3 +27,8 @@
|
|||
#elif EITHER(I2C_EEPROM, SPI_EEPROM)
|
||||
#define USE_SHARED_EEPROM 1
|
||||
#endif
|
||||
|
||||
// Allow SDSUPPORT to be disabled
|
||||
#if DISABLED(SDSUPPORT)
|
||||
#undef SDIO_SUPPORT
|
||||
#endif
|
||||
|
|
|
@ -29,10 +29,6 @@
|
|||
#error "EMERGENCY_PARSER is not yet implemented for STM32F1. Disable EMERGENCY_PARSER to continue."
|
||||
#endif
|
||||
|
||||
#if ENABLED(SDIO_SUPPORT) && DISABLED(SDSUPPORT)
|
||||
#error "SDIO_SUPPORT requires SDSUPPORT. Enable SDSUPPORT to continue."
|
||||
#endif
|
||||
|
||||
#if ENABLED(FAST_PWM_FAN)
|
||||
#error "FAST_PWM_FAN is not yet implemented for this platform."
|
||||
#endif
|
||||
|
|
|
@ -72,12 +72,14 @@ uint8_t sel_id = 0;
|
|||
const uint16_t nr = SD_ORDER(i, fileCnt);
|
||||
card.getfilename_sorted(nr);
|
||||
|
||||
if (card.flag.filenameIsDir)
|
||||
if (card.flag.filenameIsDir) {
|
||||
//SERIAL_ECHOLN(card.longest_filename);
|
||||
list_file.IsFolder[valid_name_cnt] = 1;
|
||||
else
|
||||
}
|
||||
else {
|
||||
//SERIAL_ECHOLN(card.longFilename);
|
||||
list_file.IsFolder[valid_name_cnt] = 0;
|
||||
}
|
||||
|
||||
#if 1
|
||||
//
|
||||
|
@ -523,7 +525,7 @@ void lv_gcode_file_read(uint8_t *data_buf) {
|
|||
//Color = (*p_index >> 8);
|
||||
//*p_index = Color | ((*p_index & 0xff) << 8);
|
||||
i += 2;
|
||||
if (*p_index == 0x0000) *p_index = LV_COLOR_BACKGROUND.full; // 0x18C3; //
|
||||
if (*p_index == 0x0000) *p_index = LV_COLOR_BACKGROUND.full; // 0x18C3;
|
||||
}
|
||||
#endif // TFT_LVGL_UI_SPI
|
||||
memcpy(data_buf, public_buf, 200);
|
||||
|
|
|
@ -820,7 +820,7 @@ char *creat_title_text() {
|
|||
}
|
||||
if (i >= 8000) break;
|
||||
}
|
||||
#endif // if ENABLED(TFT_LVGL_UI_SPI)
|
||||
#endif // TFT_LVGL_UI_SPI
|
||||
y_off++;
|
||||
}
|
||||
W25QXX.init(SPI_QUARTER_SPEED);
|
||||
|
@ -841,7 +841,7 @@ char *creat_title_text() {
|
|||
}
|
||||
#endif
|
||||
}
|
||||
#endif // if HAS_GCODE_PREVIEW
|
||||
#endif // HAS_GCODE_PREVIEW
|
||||
|
||||
void print_time_run() {
|
||||
static uint8_t lastSec = 0;
|
||||
|
|
|
@ -253,9 +253,8 @@
|
|||
#define BEEPER_PIN PC5
|
||||
#define BTN_ENC PE13
|
||||
|
||||
#else
|
||||
#if ENABLED(TFT_LITTLE_VGL_UI)
|
||||
//FSMC LCD
|
||||
#elif ENABLED(TFT_LITTLE_VGL_UI)
|
||||
|
||||
#define FSMC_CS_PIN PD7 // NE4
|
||||
#define FSMC_RS_PIN PD11 // A0
|
||||
|
||||
|
@ -266,9 +265,7 @@
|
|||
|
||||
#define LCD_BACKLIGHT_PIN PD13
|
||||
|
||||
#endif // TFT_LITTLE_VGL_UI
|
||||
|
||||
#endif // TFT_LVGL_UI_SPI
|
||||
#endif
|
||||
|
||||
#if HAS_SPI_LCD
|
||||
|
||||
|
|
Loading…
Reference in a new issue