1 /**************************************************************************//**
\r
2 * @file displayls013b7dh03config.h
\r
3 * @brief SLWSTK6100A_EFR32MG specific configuration for the display driver for
\r
4 * the Sharp Memory LCD model LS013B7DH03.
\r
6 ******************************************************************************
\r
8 * <b>(C) Copyright 2015 Silicon Labs, http://www.silabs.com</b>
\r
9 *******************************************************************************
\r
11 * This file is licensed under the Silabs License Agreement. See the file
\r
12 * "Silabs_License_Agreement.txt" for details. Before using this software for
\r
13 * any purpose, you must agree to the terms of that agreement.
\r
15 ******************************************************************************/
\r
18 #ifndef __SILICON_LABS_DISPLAYLS013B7DH03CONFIG_H__
\r
19 #define __SILICON_LABS_DISPLAYLS013B7DH03CONFIG_H__
\r
21 #include "displayconfigapp.h"
\r
23 /* Display device name. */
\r
24 #define SHARP_MEMLCD_DEVICE_NAME "Sharp LS013B7DH03 #1"
\r
27 /* LCD and SPI GPIO pin connections on the SLSTK3401A kit. */
\r
28 #define LCD_PORT_SCLK (gpioPortC) /* EFM_DISP_SCLK on PC8 */
\r
29 #define LCD_PIN_SCLK (8)
\r
30 #define LCD_PORT_SI (gpioPortC) /* EFM_DISP_MOSI on PC6 */
\r
31 #define LCD_PIN_SI (6)
\r
32 #define LCD_PORT_SCS (gpioPortD) /* EFM_DISP_CS on PD14 */
\r
33 #define LCD_PIN_SCS (14)
\r
34 #define LCD_PORT_EXTCOMIN (gpioPortD) /* EFM_DISP_COM on PD13 */
\r
35 #define LCD_PIN_EXTCOMIN (13)
\r
36 #define LCD_PORT_DISP_PWR (gpioPortD) /* EFM_DISP_ENABLE on PD15 */
\r
37 #define LCD_PIN_DISP_PWR (15)
\r
39 /* PRS settings for polarity inversion extcomin auto toggle. */
\r
40 #define LCD_AUTO_TOGGLE_PRS_CH (4) /* PRS channel 4. */
\r
41 #define LCD_AUTO_TOGGLE_PRS_ROUTELOC() PRS->ROUTELOC1 = \
\r
42 ((PRS->ROUTELOC1 & ~_PRS_ROUTELOC1_CH4LOC_MASK) | PRS_ROUTELOC1_CH4LOC_LOC4)
\r
43 #define LCD_AUTO_TOGGLE_PRS_ROUTEPEN PRS_ROUTEPEN_CH4PEN
\r
46 * Select how LCD polarity inversion should be handled:
\r
48 * If POLARITY_INVERSION_EXTCOMIN is defined, the EXTMODE pin is set to HIGH,
\r
49 * and the polarity inversion is armed for every rising edge of the EXTCOMIN
\r
50 * pin. The actual polarity inversion is triggered at the next transision of
\r
51 * SCS. This mode is recommended because it causes less CPU and SPI load than
\r
52 * the alternative mode, see below.
\r
53 * If POLARITY_INVERSION_EXTCOMIN is undefined, the EXTMODE pin is set to LOW,
\r
54 * and the polarity inversion is toggled by sending an SPI command. This mode
\r
55 * causes more CPU and SPI load than using the EXTCOMIN pin mode.
\r
57 #define POLARITY_INVERSION_EXTCOMIN
\r
59 /* Define POLARITY_INVERSION_EXTCOMIN_PAL_AUTO_TOGGLE if you want the PAL
\r
60 * (Platform Abstraction Layer interface) to automatically toggle the EXTCOMIN
\r
62 * If the PAL_TIMER_REPEAT function is defined the EXTCOMIN toggling is handled
\r
63 * by a timer repeat system, therefore we must undefine
\r
64 * POLARITY_INVERSION_EXTCOMIN_PAL_AUTO_TOGGLE;
\r
66 #ifndef PAL_TIMER_REPEAT_FUNCTION
\r
67 #define POLARITY_INVERSION_EXTCOMIN_PAL_AUTO_TOGGLE
\r
70 #endif /* __SILICON_LABS_DISPLAYLS013B7DH03CONFIG_H__ */
\r