38
38
#define LCD_READ_ID4 0xD3 // Read display identification information (0xD3 on ILI9341)
39
39
#endif
40
40
41
- #define DATASIZE_8BIT SPI_DATASIZE_8BIT
42
- #define DATASIZE_16BIT SPI_DATASIZE_16BIT
43
- #define TFT_IO_DRIVER TFT_FSMC
44
- #define DMA_MAX_WORDS 0xFFFF
41
+ #define DATASIZE_8BIT SPI_DATASIZE_8BIT
42
+ #define DATASIZE_16BIT SPI_DATASIZE_16BIT
43
+ #define TFT_IO_DRIVER TFT_FSMC
44
+ #define DMA_MAX_WORDS 0xFFFF
45
45
46
46
#define TFT_DATASIZE TERN (TFT_INTERFACE_FSMC_8BIT, DATASIZE_8BIT, DATASIZE_16BIT)
47
47
typedef TERN(TFT_INTERFACE_FSMC_8BIT, uint8_t , uint16_t ) tft_data_t;
@@ -64,7 +64,7 @@ class TFT_FSMC {
64
64
65
65
static LCD_CONTROLLER_TypeDef *LCD;
66
66
67
- static uint32_t readID (tft_data_t reg );
67
+ static uint32_t readID (tft_data_t inReg );
68
68
static void transmit (tft_data_t data) { LCD->RAM = data; __DSB (); }
69
69
static void transmit (uint32_t memoryIncrease, uint16_t *data, uint16_t count);
70
70
static void transmitDMA (uint32_t memoryIncrease, uint16_t *data, uint16_t count);
@@ -79,7 +79,7 @@ class TFT_FSMC {
79
79
static void dataTransferEnd () {};
80
80
81
81
static void writeData (uint16_t data) { transmit (tft_data_t (data)); }
82
- static void writeReg (uint16_t inReg) { LCD->REG = tft_data_t (inReg); __DSB (); }
82
+ static void writeReg (const uint16_t inReg) { LCD->REG = tft_data_t (inReg); __DSB (); }
83
83
84
84
static void writeSequence_DMA (uint16_t *data, uint16_t count) { transmitDMA (DMA_PINC_ENABLE, data, count); }
85
85
static void writeMultiple_DMA (uint16_t color, uint16_t count) { static uint16_t data; data = color; transmitDMA (DMA_PINC_DISABLE, &data, count); }
0 commit comments