FYSETC TFT81050 LCD support (#17568)
This commit is contained in:
parent
791873b10d
commit
e990a98404
2 changed files with 87 additions and 83 deletions
|
@ -1344,6 +1344,7 @@
|
||||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||||
|
//#define LCD_FYSETC_TFT81050 // FYSETC with 5" (800x480)
|
||||||
|
|
||||||
// Correct the resolution if not using the stock TFT panel.
|
// Correct the resolution if not using the stock TFT panel.
|
||||||
//#define TOUCH_UI_320x240
|
//#define TOUCH_UI_320x240
|
||||||
|
|
|
@ -25,24 +25,23 @@
|
||||||
#define HAS_RESOLUTION (defined(TOUCH_UI_320x240) || defined(TOUCH_UI_480x272) || defined(TOUCH_UI_800x480))
|
#define HAS_RESOLUTION (defined(TOUCH_UI_320x240) || defined(TOUCH_UI_480x272) || defined(TOUCH_UI_800x480))
|
||||||
|
|
||||||
#define IS_FT800 \
|
#define IS_FT800 \
|
||||||
constexpr uint16_t ftdi_chip = 800; \
|
constexpr uint16_t ftdi_chip = 800; \
|
||||||
using namespace FTDI_FT800; \
|
using namespace FTDI_FT800; \
|
||||||
namespace DL { \
|
namespace DL { \
|
||||||
using namespace FTDI_FT800_DL; \
|
using namespace FTDI_FT800_DL; \
|
||||||
} \
|
} \
|
||||||
typedef ft800_memory_map ftdi_memory_map; \
|
typedef ft800_memory_map ftdi_memory_map; \
|
||||||
typedef ft800_registers ftdi_registers;
|
typedef ft800_registers ftdi_registers;
|
||||||
|
|
||||||
#define IS_FT810 \
|
#define IS_FT810 \
|
||||||
constexpr uint16_t ftdi_chip = 810; \
|
constexpr uint16_t ftdi_chip = 810; \
|
||||||
using namespace FTDI_FT810; \
|
using namespace FTDI_FT810; \
|
||||||
namespace DL { \
|
namespace DL { \
|
||||||
using namespace FTDI_FT800_DL; \
|
using namespace FTDI_FT800_DL; \
|
||||||
using namespace FTDI_FT810_DL; \
|
using namespace FTDI_FT810_DL; \
|
||||||
} \
|
} \
|
||||||
typedef ft810_memory_map ftdi_memory_map; \
|
typedef ft810_memory_map ftdi_memory_map; \
|
||||||
typedef ft810_registers ftdi_registers;
|
typedef ft810_registers ftdi_registers;
|
||||||
|
|
||||||
|
|
||||||
#ifdef LCD_FTDI_VM800B35A
|
#ifdef LCD_FTDI_VM800B35A
|
||||||
#if !HAS_RESOLUTION
|
#if !HAS_RESOLUTION
|
||||||
|
@ -53,30 +52,25 @@
|
||||||
#endif
|
#endif
|
||||||
namespace FTDI {
|
namespace FTDI {
|
||||||
IS_FT800
|
IS_FT800
|
||||||
constexpr bool Use_Crystal = true; // 0 = use internal oscillator, 1 = module has a crystal populated
|
constexpr bool Use_Crystal = true; // 0 = use internal oscillator, 1 = module has a crystal populated
|
||||||
constexpr bool GPIO_0_Audio_Enable = false; /* 1 = does use GPIO00 for amplifier control, 0 = not in use for Audio */
|
constexpr bool GPIO_0_Audio_Enable = false; /* 1 = does use GPIO00 for amplifier control, 0 = not in use for Audio */
|
||||||
constexpr bool GPIO_1_Audio_Shutdown = true; /* 1 = does use GPIO01 for amplifier control, 0 = not in use for Audio */
|
constexpr bool GPIO_1_Audio_Shutdown = true; /* 1 = does use GPIO01 for amplifier control, 0 = not in use for Audio */
|
||||||
constexpr uint8_t Swizzle = 2;
|
constexpr uint8_t Swizzle = 2;
|
||||||
constexpr uint8_t CSpread = 1;
|
constexpr uint8_t CSpread = 1;
|
||||||
|
|
||||||
constexpr uint16_t touch_threshold = 1200; /* touch-sensitivity */
|
constexpr uint16_t touch_threshold = 1200; /* touch-sensitivity */
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Settings for the Haoyu Electronics, 4.3" Graphical LCD Touchscreen, 480x272, SPI, FT800 (FT800CB-HY43B)
|
* Settings for the Haoyu Electronics, 4.3" Graphical LCD Touchscreen, 480x272, SPI, FT800 (FT800CB-HY43B)
|
||||||
* Haoyu Electronics, 5" Graphical LCD Touchscreen, 480x272, SPI, FT800 (FT800CB-HY50B)
|
* and 5" Graphical LCD Touchscreen, 480x272, SPI, FT800 (FT800CB-HY50B)
|
||||||
*
|
* http://www.hotmcu.com/43-graphical-lcd-touchscreen-480x272-spi-ft800-p-111.html?cPath=6_16
|
||||||
* http://www.hotmcu.com/43-graphical-lcd-touchscreen-480x272-spi-ft800-p-111.html?cPath=6_16
|
* http://www.hotmcu.com/5-graphical-lcd-touchscreen-480x272-spi-ft800-p-124.html?cPath=6_16
|
||||||
* http://www.hotmcu.com/5-graphical-lcd-touchscreen-480x272-spi-ft800-p-124.html?cPath=6_16
|
|
||||||
*
|
|
||||||
* Datasheet:
|
* Datasheet:
|
||||||
*
|
* http://www.hantronix.com/files/data/1278363262430-3.pdf
|
||||||
* http://www.hantronix.com/files/data/1278363262430-3.pdf
|
* http://www.haoyuelectronics.com/Attachment/HY43-LCD/LCD%20DataSheet.pdf
|
||||||
* http://www.haoyuelectronics.com/Attachment/HY43-LCD/LCD%20DataSheet.pdf
|
* http://www.haoyuelectronics.com/Attachment/HY5-LCD-HD/KD50G21-40NT-A1.pdf
|
||||||
* http://www.haoyuelectronics.com/Attachment/HY5-LCD-HD/KD50G21-40NT-A1.pdf
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#elif defined(LCD_HAOYU_FT800CB)
|
#elif defined(LCD_HAOYU_FT800CB)
|
||||||
#if !HAS_RESOLUTION
|
#if !HAS_RESOLUTION
|
||||||
#define TOUCH_UI_480x272
|
#define TOUCH_UI_480x272
|
||||||
|
@ -86,25 +80,20 @@
|
||||||
#endif
|
#endif
|
||||||
namespace FTDI {
|
namespace FTDI {
|
||||||
IS_FT800
|
IS_FT800
|
||||||
constexpr bool Use_Crystal = true; // 0 = use internal oscillator, 1 = module has a crystal populated
|
constexpr bool Use_Crystal = true; // 0 = use internal oscillator, 1 = module has a crystal populated
|
||||||
constexpr bool GPIO_0_Audio_Enable = false;
|
constexpr bool GPIO_0_Audio_Enable = false;
|
||||||
constexpr bool GPIO_1_Audio_Shutdown = false;
|
constexpr bool GPIO_1_Audio_Shutdown = false;
|
||||||
constexpr uint8_t Swizzle = 0;
|
constexpr uint8_t Swizzle = 0;
|
||||||
constexpr uint8_t CSpread = 1;
|
constexpr uint8_t CSpread = 1;
|
||||||
constexpr uint16_t touch_threshold = 2000; /* touch-sensitivity */
|
constexpr uint16_t touch_threshold = 2000; /* touch-sensitivity */
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Settings for the Haoyu Electronics, 5" Graphical LCD Touchscreen, 800x480, SPI, FT810
|
* Settings for the Haoyu Electronics, 5" Graphical LCD Touchscreen, 800x480, SPI, FT810
|
||||||
*
|
* http://www.hotmcu.com/5-graphical-lcd-touchscreen-800x480-spi-ft810-p-286.html
|
||||||
* http://www.hotmcu.com/5-graphical-lcd-touchscreen-800x480-spi-ft810-p-286.html
|
|
||||||
*
|
|
||||||
* Datasheet:
|
* Datasheet:
|
||||||
*
|
* http://www.haoyuelectronics.com/Attachment/HY5-LCD-HD/KD50G21-40NT-A1.pdf
|
||||||
* http://www.haoyuelectronics.com/Attachment/HY5-LCD-HD/KD50G21-40NT-A1.pdf
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#elif defined(LCD_HAOYU_FT810CB)
|
#elif defined(LCD_HAOYU_FT810CB)
|
||||||
#if !HAS_RESOLUTION
|
#if !HAS_RESOLUTION
|
||||||
#define TOUCH_UI_800x480
|
#define TOUCH_UI_800x480
|
||||||
|
@ -114,25 +103,20 @@
|
||||||
#endif
|
#endif
|
||||||
namespace FTDI {
|
namespace FTDI {
|
||||||
IS_FT810
|
IS_FT810
|
||||||
constexpr bool Use_Crystal = true; // 0 = use internal oscillator, 1 = module has a crystal populated
|
constexpr bool Use_Crystal = true; // 0 = use internal oscillator, 1 = module has a crystal populated
|
||||||
constexpr bool GPIO_0_Audio_Enable = false;
|
constexpr bool GPIO_0_Audio_Enable = false;
|
||||||
constexpr bool GPIO_1_Audio_Shutdown = false;
|
constexpr bool GPIO_1_Audio_Shutdown = false;
|
||||||
constexpr uint8_t Swizzle = 0;
|
constexpr uint8_t Swizzle = 0;
|
||||||
constexpr uint8_t CSpread = 1;
|
constexpr uint8_t CSpread = 1;
|
||||||
constexpr uint16_t touch_threshold = 2000; /* touch-sensitivity */
|
constexpr uint16_t touch_threshold = 2000; /* touch-sensitivity */
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Settings for the 4D Systems, 4.3" Embedded SPI Display 480x272, SPI, FT800 (4DLCD-FT843)
|
* Settings for the 4D Systems, 4.3" Embedded SPI Display 480x272, SPI, FT800 (4DLCD-FT843)
|
||||||
*
|
* http://www.4dsystems.com.au/product/4DLCD_FT843/
|
||||||
* http://www.4dsystems.com.au/product/4DLCD_FT843/
|
|
||||||
*
|
|
||||||
* Datasheet:
|
* Datasheet:
|
||||||
*
|
* http://www.4dsystems.com.au/productpages/4DLCD-FT843/downloads/FT843-4.3-Display_datasheet_R_1_2.pdf
|
||||||
* http://www.4dsystems.com.au/productpages/4DLCD-FT843/downloads/FT843-4.3-Display_datasheet_R_1_2.pdf
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#elif defined(LCD_4DSYSTEMS_4DLCD_FT843)
|
#elif defined(LCD_4DSYSTEMS_4DLCD_FT843)
|
||||||
#if !HAS_RESOLUTION
|
#if !HAS_RESOLUTION
|
||||||
#define TOUCH_UI_480x272
|
#define TOUCH_UI_480x272
|
||||||
|
@ -142,23 +126,19 @@
|
||||||
#endif
|
#endif
|
||||||
namespace FTDI {
|
namespace FTDI {
|
||||||
IS_FT800
|
IS_FT800
|
||||||
constexpr bool Use_Crystal = true; // 0 = use internal oscillator, 1 = module has a crystal populated
|
constexpr bool Use_Crystal = true; // 0 = use internal oscillator, 1 = module has a crystal populated
|
||||||
constexpr bool GPIO_0_Audio_Enable = false;
|
constexpr bool GPIO_0_Audio_Enable = false;
|
||||||
constexpr bool GPIO_1_Audio_Shutdown = true;
|
constexpr bool GPIO_1_Audio_Shutdown = true;
|
||||||
constexpr uint8_t Swizzle = 0;
|
constexpr uint8_t Swizzle = 0;
|
||||||
constexpr uint8_t CSpread = 1;
|
constexpr uint8_t CSpread = 1;
|
||||||
constexpr uint16_t touch_threshold = 1200; /* touch-sensitivity */
|
constexpr uint16_t touch_threshold = 1200; /* touch-sensitivity */
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Settings for the Aleph Objects Color LCD User Interface
|
* Settings for the Aleph Objects Color LCD User Interface
|
||||||
*
|
* https://code.alephobjects.com/source/aotctl/
|
||||||
* https://code.alephobjects.com/source/aotctl/
|
|
||||||
*
|
|
||||||
* Datasheet:
|
* Datasheet:
|
||||||
*
|
* http://www.hantronix.com/files/data/s1501799605s500-gh7.pdf
|
||||||
* http://www.hantronix.com/files/data/s1501799605s500-gh7.pdf
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
#elif defined(LCD_ALEPHOBJECTS_CLCD_UI)
|
#elif defined(LCD_ALEPHOBJECTS_CLCD_UI)
|
||||||
#if !HAS_RESOLUTION
|
#if !HAS_RESOLUTION
|
||||||
|
@ -169,15 +149,38 @@
|
||||||
#endif
|
#endif
|
||||||
namespace FTDI {
|
namespace FTDI {
|
||||||
IS_FT810
|
IS_FT810
|
||||||
constexpr bool Use_Crystal = false; // 0 = use internal oscillator, 1 = module has a crystal populated
|
constexpr bool Use_Crystal = false; // 0 = use internal oscillator, 1 = module has a crystal populated
|
||||||
constexpr bool GPIO_0_Audio_Enable = true; // The AO CLCD uses GPIO0 to enable audio
|
constexpr bool GPIO_0_Audio_Enable = true; // The AO CLCD uses GPIO0 to enable audio
|
||||||
constexpr bool GPIO_1_Audio_Shutdown = false;
|
constexpr bool GPIO_1_Audio_Shutdown = false;
|
||||||
constexpr uint8_t Swizzle = 0;
|
constexpr uint8_t Swizzle = 0;
|
||||||
constexpr uint8_t CSpread = 0;
|
constexpr uint8_t CSpread = 0;
|
||||||
constexpr uint16_t touch_threshold = 2000; /* touch-sensitivity */
|
constexpr uint16_t touch_threshold = 2000; /* touch-sensitivity */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FYSETC Color LCD
|
||||||
|
* https://www.aliexpress.com/item/4000627651757.html
|
||||||
|
* Product information:
|
||||||
|
* https://github.com/FYSETC/TFT81050
|
||||||
|
*/
|
||||||
|
#elif defined(LCD_FYSETC_TFT81050)
|
||||||
|
#if !HAS_RESOLUTION
|
||||||
|
#define TOUCH_UI_800x480
|
||||||
|
#endif
|
||||||
|
#ifndef FTDI_API_LEVEL
|
||||||
|
#define FTDI_API_LEVEL 810
|
||||||
|
#endif
|
||||||
|
namespace FTDI {
|
||||||
|
IS_FT810
|
||||||
|
constexpr bool Use_Crystal = false; // 0 = use internal oscillator, 1 = module has a crystal populated
|
||||||
|
constexpr bool GPIO_0_Audio_Enable = true; // The AO CLCD uses GPIO0 to enable audio
|
||||||
|
constexpr bool GPIO_1_Audio_Shutdown = false;
|
||||||
|
constexpr uint8_t Swizzle = 0;
|
||||||
|
constexpr uint8_t CSpread = 0;
|
||||||
|
constexpr uint16_t touch_threshold = 2000; /* touch-sensitivity */
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#error "Unknown or no TOUCH_UI_FTDI_EVE board specified. To add a new board, modify 'ftdi_eve_boards.h'."
|
#error "Unknown or no TOUCH_UI_FTDI_EVE board specified. To add a new board, modify this file."
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Reference in a new issue