TFT cleanup
This commit is contained in:
		@@ -21,30 +21,28 @@
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include "../../../inc/MarlinConfig.h"
 | 
			
		||||
 | 
			
		||||
#ifdef STM32F1xx
 | 
			
		||||
  #include "stm32f1xx_hal.h"
 | 
			
		||||
  #define __IS_DMA_ENABLED(__HANDLE__)  ((__HANDLE__)->Instance->CCR & DMA_CCR_EN)
 | 
			
		||||
#elif defined(STM32F4xx)
 | 
			
		||||
  #include "stm32f4xx_hal.h"
 | 
			
		||||
  #define __IS_DMA_ENABLED(__HANDLE__)  ((__HANDLE__)->Instance->CR & DMA_SxCR_EN)
 | 
			
		||||
#else
 | 
			
		||||
  #error FSMC TFT is currently only supported on STM32F1 and STM32F4 hardware.
 | 
			
		||||
  #error "FSMC TFT is currently only supported on STM32F1 and STM32F4 hardware."
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef LCD_READ_ID
 | 
			
		||||
  #define LCD_READ_ID 0x04   // Read display identification information (0xD3 on ILI9341)
 | 
			
		||||
  #define LCD_READ_ID  0x04   // Read display identification information (0xD3 on ILI9341)
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef LCD_READ_ID4
 | 
			
		||||
  #define LCD_READ_ID4 0xD3   // Read display identification information (0xD3 on ILI9341)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#define DATASIZE_8BIT    SPI_DATASIZE_8BIT
 | 
			
		||||
#define DATASIZE_16BIT   SPI_DATASIZE_16BIT
 | 
			
		||||
#define TFT_IO_DRIVER TFT_FSMC
 | 
			
		||||
 | 
			
		||||
#ifdef STM32F1xx
 | 
			
		||||
  #define __IS_DMA_ENABLED(__HANDLE__)      ((__HANDLE__)->Instance->CCR & DMA_CCR_EN)
 | 
			
		||||
#elif defined(STM32F4xx)
 | 
			
		||||
  #define __IS_DMA_ENABLED(__HANDLE__)      ((__HANDLE__)->Instance->CR & DMA_SxCR_EN)
 | 
			
		||||
#endif
 | 
			
		||||
#define DATASIZE_8BIT  SPI_DATASIZE_8BIT
 | 
			
		||||
#define DATASIZE_16BIT SPI_DATASIZE_16BIT
 | 
			
		||||
#define TFT_IO_DRIVER  TFT_FSMC
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  __IO uint16_t REG;
 | 
			
		||||
 
 | 
			
		||||
@@ -22,7 +22,7 @@
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#ifndef LCD_READ_ID
 | 
			
		||||
  #define LCD_READ_ID 0x04   // Read display identification information (0xD3 on ILI9341)
 | 
			
		||||
  #define LCD_READ_ID  0x04   // Read display identification information (0xD3 on ILI9341)
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef LCD_READ_ID4
 | 
			
		||||
  #define LCD_READ_ID4 0xD3   // Read display identification information (0xD3 on ILI9341)
 | 
			
		||||
@@ -30,9 +30,9 @@
 | 
			
		||||
 | 
			
		||||
#include <libmaple/dma.h>
 | 
			
		||||
 | 
			
		||||
#define DATASIZE_8BIT    DMA_SIZE_8BITS
 | 
			
		||||
#define DATASIZE_16BIT   DMA_SIZE_16BITS
 | 
			
		||||
#define TFT_IO_DRIVER TFT_FSMC
 | 
			
		||||
#define DATASIZE_8BIT  DMA_SIZE_8BITS
 | 
			
		||||
#define DATASIZE_16BIT DMA_SIZE_16BITS
 | 
			
		||||
#define TFT_IO_DRIVER  TFT_FSMC
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
  __IO uint16_t REG;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user