53 #define d4dlcdhw_kinetis_spi_ID 1
58 #if (D4D_MK_STR(D4D_LLD_LCD_HW) == d4dlcdhw_kinetis_spi_ID)
66 #if D4D_COLOR_SYSTEM != D4D_COLOR_SYSTEM_RGB565
67 #error The eGUI low level driver "d4dlcdhw_kinetis_spi" not supported selected type of D4D_COLOR_SYSTEM. To run this driver just select D4D_COLOR_SYSTEM_RGB565.
73 static unsigned char D4DLCDHW_Init_Kinetis_Spi(
void);
74 static unsigned char D4DLCDHW_DeInit_Kinetis_Spi(
void);
75 static void D4DLCDHW_SendDataWord_Kinetis_Spi(
unsigned short value);
76 static void D4DLCDHW_SendCmdWord_Kinetis_Spi(
unsigned short cmd);
77 static unsigned short D4DLCDHW_ReadDataWord_Kinetis_Spi(
void);
78 static unsigned short D4DLCDHW_ReadCmdWord_Kinetis_Spi(
void);
93 D4DLCDHW_Init_Kinetis_Spi,
94 D4DLCDHW_SendDataWord_Kinetis_Spi,
95 D4DLCDHW_SendCmdWord_Kinetis_Spi,
96 D4DLCDHW_ReadDataWord_Kinetis_Spi,
97 D4DLCDHW_ReadCmdWord_Kinetis_Spi,
98 D4DLCDHW_PinCtl_Kinetis_Spi,
99 D4DLCD_FlushBuffer_Kinetis_Spi,
100 D4DLCDHW_DeInit_Kinetis_Spi
124 static unsigned char D4DLCDHW_Init_Kinetis_Spi(
void)
128 #ifdef D4DLCD_DISPLAY_MCU_USER_INIT
129 D4DLCD_DISPLAY_MCU_USER_INIT
139 D4DLCD_SPI_MCR = SPI_MCR_HALT_MASK | SPI_MCR_CLR_TXF_MASK | SPI_MCR_CLR_RXF_MASK;
144 #ifdef D4DLCD_SPI_DBL_BRATE
149 D4DLCD_SPI_MCR |= (SPI_MCR_PCSIS(1 << (D4DLCD_SPI_PCS_ID))|SPI_MCR_MSTR_MASK);
173 static unsigned char D4DLCDHW_DeInit_Kinetis_Spi(
void)
187 static void D4DLCDHW_SendDataWord_Kinetis_Spi(
unsigned short value)
194 D4DLCD_SPI_PUSHR = SPI_PUSHR_PCS(1 << (D4DLCD_SPI_PCS_ID)) | SPI_PUSHR_CTAS(0) | SPI_PUSHR_TXDATA((
unsigned short)value);
209 static void D4DLCDHW_SendCmdWord_Kinetis_Spi(
unsigned short cmd)
212 D4DLCDHW_SendDataWord_Kinetis_Spi(cmd);
227 static unsigned short D4DLCDHW_ReadDataWord_Kinetis_Spi(
void)
242 static unsigned short D4DLCDHW_ReadCmdWord_Kinetis_Spi(
void)
273 D4DLCD_DEASSERT_RESET
286 #ifdef D4DLCD_BACKLIGHT
292 INPUT(D4DLCD_BACKLIGHT);
295 D4DLCD_DEASSERT_BACKLIGHT
298 D4DLCD_ASSERT_BACKLIGHT;
326 #endif //(D4D_MK_STR(D4D_LLD_LCD_HW) == d4dlcdhw_kinetis_Spi_ID)
D4D low level standard LCD Hardware interface API structure.
D4D Driver main header file.
D4DHW_PIN_STATE
D4D low level MCU pin state enumeration type.
D4DLCD_FLUSH_MODE
D4D low level eGUI flush screen types enumeration.
D4D Driver private header file.
D4DLCDHW_PINS
D4D low level MCU types definition for general LCD screen control signals.
#define D4DLCD_SPI_PORT_INIT
Switch pin to input mode (equivalent to high-Z)
Switch pin to output mode.
Set pin output register to logic 1.
LCD device backlight enable signal.
D4D driver - kinetis_spi hardware lcd driver function header file.
#define D4D_UNUSED(x)
Macro used just for notify compiler that the input parameter is not used.
Set pin output register to logic 0.
D4D driver - resistive touch screen driver function header file.