Tweak some formatting, replace tabs
This commit is contained in:
parent
808df82b36
commit
8f9b246d0e
|
@ -26,10 +26,11 @@
|
||||||
* Communication interface for FSMC
|
* Communication interface for FSMC
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(STM32F1) || defined(STM32F1xx)
|
||||||
|
|
||||||
#include "../../inc/MarlinConfig.h"
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
#if HAS_GRAPHICAL_LCD
|
#if HAS_GRAPHICAL_LCD
|
||||||
#if defined(STM32F1) || defined(STM32F1xx)
|
|
||||||
|
|
||||||
#include "U8glib.h"
|
#include "U8glib.h"
|
||||||
#include "libmaple/fsmc.h"
|
#include "libmaple/fsmc.h"
|
||||||
|
@ -227,29 +228,30 @@ void LCD_IO_Init(uint8_t cs, uint8_t rs) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void LCD_IO_WriteData(uint16_t RegValue) {
|
void LCD_IO_WriteData(uint16_t RegValue) {
|
||||||
LCD->RAM = RegValue;
|
LCD->RAM = RegValue;
|
||||||
__DSB();
|
__DSB();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LCD_IO_WriteReg(uint8_t Reg) {
|
void LCD_IO_WriteReg(uint8_t Reg) {
|
||||||
LCD->REG = (uint16_t)Reg;
|
LCD->REG = (uint16_t)Reg;
|
||||||
__DSB();
|
__DSB();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t LCD_IO_ReadData(uint16_t RegValue, uint8_t ReadSize) {
|
uint32_t LCD_IO_ReadData(uint16_t RegValue, uint8_t ReadSize) {
|
||||||
volatile uint32_t data;
|
volatile uint32_t data;
|
||||||
LCD->REG = (uint16_t)RegValue;
|
LCD->REG = (uint16_t)RegValue;
|
||||||
__DSB();
|
__DSB();
|
||||||
|
|
||||||
data = LCD->RAM; // dummy read
|
data = LCD->RAM; // dummy read
|
||||||
data = LCD->RAM & 0x00FF;
|
data = LCD->RAM & 0x00FF;
|
||||||
|
|
||||||
while (--ReadSize) {
|
while (--ReadSize) {
|
||||||
data <<= 8;
|
data <<= 8;
|
||||||
data |= (LCD->RAM & 0x00FF);
|
data |= (LCD->RAM & 0x00FF);
|
||||||
}
|
}
|
||||||
return (uint32_t)data;
|
return (uint32_t)data;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // STM32F1 || STM32F1xx
|
|
||||||
#endif // HAS_GRAPHICAL_LCD
|
#endif // HAS_GRAPHICAL_LCD
|
||||||
|
|
||||||
|
#endif // STM32F1 || STM32F1xx
|
||||||
|
|
|
@ -117,7 +117,7 @@ void GcodeSuite::M25() {
|
||||||
|
|
||||||
// Set initial pause flag to prevent more commands from landing in the queue while we try to pause
|
// Set initial pause flag to prevent more commands from landing in the queue while we try to pause
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
if (IS_SD_PRINTING()) { card.pauseSDPrint(); }
|
if (IS_SD_PRINTING()) card.pauseSDPrint();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(PARK_HEAD_ON_PAUSE)
|
#if ENABLED(PARK_HEAD_ON_PAUSE)
|
||||||
|
|
Loading…
Reference in a new issue