19#ifndef ILI9341_PARAMS_H
20#define ILI9341_PARAMS_H
34#ifndef ILI9341_PARAM_SPI
35#define ILI9341_PARAM_SPI SPI_DEV(0)
37#ifndef ILI9341_PARAM_SPI_CLK
38#define ILI9341_PARAM_SPI_CLK SPI_CLK_5MHZ
40#ifndef ILI9341_PARAM_CS
41#define ILI9341_PARAM_CS GPIO_PIN(2, 2)
43#ifndef ILI9341_PARAM_DCX
44#define ILI9341_PARAM_DCX GPIO_PIN(3, 13)
46#ifndef ILI9341_PARAM_RST
47#define ILI9341_PARAM_RST GPIO_UNDEF
49#ifndef ILI9341_PARAM_SPI_MODE
50#define ILI9341_PARAM_SPI_MODE SPI_MODE_0
52#ifndef ILI9341_PARAM_RGB
53#define ILI9341_PARAM_RGB 0
55#ifndef ILI9341_PARAM_INVERTED
56#define ILI9341_PARAM_INVERTED 0
58#ifndef ILI9341_PARAM_NUM_LINES
59#define ILI9341_PARAM_NUM_LINES 320U
61#ifndef ILI9341_PARAM_RGB_CHANNELS
62#define ILI9341_PARAM_RGB_CHANNELS 240U
64#ifndef ILI9341_PARAM_ROTATION
65#define ILI9341_PARAM_ROTATION ILI9341_ROTATION_HORZ_FLIP
67#ifndef ILI9341_PARAM_OFFSET_X
68#define ILI9341_PARAM_OFFSET_X 0
70#ifndef ILI9341_PARAM_OFFSET_Y
71#define ILI9341_PARAM_OFFSET_Y 0
74#if MODULE_LCD_SPI || DOXYGEN
76#define ILI9341_PARAM_IF_SPI .spi = ILI9341_PARAM_SPI, \
77 .spi_clk = ILI9341_PARAM_SPI_CLK, \
78 .spi_mode = ILI9341_PARAM_SPI_MODE,
80#define ILI9341_PARAM_IF_SPI
83#if MODULE_LCD_PARALLEL || DOXYGEN
85#define ILI9341_PARAM_IF_PAR .d0_pin = ILI9341_PARAM_D0, \
86 .d1_pin = ILI9341_PARAM_D1, \
87 .d2_pin = ILI9341_PARAM_D2, \
88 .d3_pin = ILI9341_PARAM_D3, \
89 .d4_pin = ILI9341_PARAM_D4, \
90 .d5_pin = ILI9341_PARAM_D5, \
91 .d6_pin = ILI9341_PARAM_D6, \
92 .d7_pin = ILI9341_PARAM_D7, \
93 .wrx_pin = ILI9341_PARAM_WRX, \
94 .rdx_pin = ILI9341_PARAM_RDX,
96#define ILI9341_PARAM_IF_PAR
99#if MODULE_LCD_PARALLEL_16BIT || DOXYGEN
101#define ILI9341_PARAM_IF_PAR_16BIT .d8_pin = ILI9341_PARAM_D8, \
102 .d9_pin = ILI9341_PARAM_D9, \
103 .d10_pin = ILI9341_PARAM_D10, \
104 .d11_pin = ILI9341_PARAM_D11, \
105 .d12_pin = ILI9341_PARAM_D12, \
106 .d13_pin = ILI9341_PARAM_D13, \
107 .d14_pin = ILI9341_PARAM_D14, \
108 .d15_pin = ILI9341_PARAM_D15,
110#define ILI9341_PARAM_IF_PAR_16BIT
113#if MODULE_LCD_PARALLEL_16BIT || DOXYGEN
115#define ILI9341_PARAM_IF_MODE .mode = LCD_IF_PARALLEL_16BIT,
116#elif MODULE_LCD_PARALLEL
118#define ILI9341_PARAM_IF_MODE .mode = LCD_IF_PARALLEL_8BIT,
121#define ILI9341_PARAM_IF_MODE
135#ifndef ILI9341_PARAMS
136#define ILI9341_PARAMS { ILI9341_PARAM_IF_MODE \
137 ILI9341_PARAM_IF_SPI \
138 ILI9341_PARAM_IF_PAR \
139 ILI9341_PARAM_IF_PAR_16BIT \
140 .cs_pin = ILI9341_PARAM_CS, \
141 .dcx_pin = ILI9341_PARAM_DCX, \
142 .rst_pin = ILI9341_PARAM_RST, \
143 .rgb = ILI9341_PARAM_RGB, \
144 .inverted = ILI9341_PARAM_INVERTED, \
145 .lines = ILI9341_PARAM_NUM_LINES, \
146 .rgb_channels = ILI9341_PARAM_RGB_CHANNELS, \
147 .rotation = ILI9341_PARAM_ROTATION, \
148 .offset_x = ILI9341_PARAM_OFFSET_X, \
149 .offset_y = ILI9341_PARAM_OFFSET_Y, \
165#ifndef ILI9341_PARAM_SCREEN_IDS
166#define ILI9341_PARAM_SCREEN_IDS 0
180#define ILI9341_NUMOF ARRAY_SIZE(ili9341_params)
184#define ILI9341_SCREEN_NUMOF ARRAY_SIZE(ili9341_screen_ids)
#define ILI9341_PARAM_SCREEN_IDS
Default screen identifiers.
static const lcd_params_t ili9341_params[]
Configure ILI9341.
#define ILI9341_PARAMS
Default params.
static const uint8_t ili9341_screen_ids[]
Configure screen identifiers.
Device initialization parameters.