Browse Source

Clean up W25QXXFlash class

vanilla_fb_2.0.x
Scott Lahteine 4 years ago
parent
commit
6759aff220
  1. 4
      Marlin/src/gcode/control/M993_M994.cpp
  2. 2
      Marlin/src/lcd/extui/lib/mks_ui/SPIFlashStorage.cpp
  3. 1
      Marlin/src/lcd/extui/lib/mks_ui/draw_ui.cpp
  4. 2
      Marlin/src/lcd/extui/lib/mks_ui/pic_manager.h
  5. 3
      Marlin/src/libs/W25Qxx.cpp
  6. 10
      Marlin/src/libs/W25Qxx.h

4
Marlin/src/gcode/control/M993_M994.cpp

@ -41,8 +41,6 @@ void GcodeSuite::M993() {
return;
}
W25QXXFlash W25QXX;
uint8_t buf[1024];
uint32_t addr = 0;
W25QXX.init(SPI_QUARTER_SPEED);
@ -71,8 +69,6 @@ void GcodeSuite::M994() {
return;
}
W25QXXFlash W25QXX;
uint8_t buf[1024];
uint32_t addr = 0;
W25QXX.init(SPI_QUARTER_SPEED);

2
Marlin/src/lcd/extui/lib/mks_ui/SPIFlashStorage.cpp

@ -27,8 +27,6 @@
#include "../../../../inc/MarlinConfig.h"
#include "SPIFlashStorage.h"
extern W25QXXFlash W25QXX;
uint8_t SPIFlashStorage::m_pageData[SPI_FLASH_PageSize];
uint32_t SPIFlashStorage::m_currentPage;
uint16_t SPIFlashStorage::m_pageDataUsed;

1
Marlin/src/lcd/extui/lib/mks_ui/draw_ui.cpp

@ -49,7 +49,6 @@
#include "../../../../feature/pause.h"
#endif
W25QXXFlash W25QXX;
CFG_ITMES gCfgItems;
UI_CFG uiCfg;
DISP_STATE_STACK disp_state_stack;

2
Marlin/src/lcd/extui/lib/mks_ui/pic_manager.h

@ -156,8 +156,6 @@ extern void spi_flash_read_test();
extern void default_view_Read(uint8_t *default_view_Rbuff, uint32_t default_view_Readsize);
extern void flash_view_Read(uint8_t *flash_view_Rbuff, uint32_t flash_view_Readsize);
extern W25QXXFlash W25QXX;
#ifdef __cplusplus
} /* C-declarations for C++ */
#endif

3
Marlin/src/libs/W25Qxx.cpp

@ -24,9 +24,10 @@
#if HAS_SPI_FLASH
#include "W25Qxx.h"
#include <SPI.h>
#include "W25Qxx.h"
W25QXXFlash W25QXX;
#ifndef SPI_FLASH_MISO_PIN
#define SPI_FLASH_MISO_PIN W25QXX_MISO_PIN

10
Marlin/src/libs/W25Qxx.h

@ -1,4 +1,4 @@
/**
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
@ -21,10 +21,6 @@
*/
#pragma once
//#ifdef __cplusplus
//extern "C" { /* C-declarations for C++ */
//#endif
#include <stdint.h>
#define W25X_WriteEnable 0x06
@ -71,6 +67,4 @@ public:
static void SPI_FLASH_BufferRead(uint8_t* pBuffer, uint32_t ReadAddr, uint16_t NumByteToRead);
};
//#ifdef __cplusplus
//} /* C-declarations for C++ */
//#endif
extern W25QXXFlash W25QXX;

Loading…
Cancel
Save