Loading...
Searching...
No Matches
ili9341_params.h File Reference

Default configuration for ili9341. More...

Detailed Description

Default configuration for ili9341.

Author
Koen Zandberg koen@.nosp@m.berg.nosp@m.zand..nosp@m.net

Definition in file ili9341_params.h.

#include "board.h"
#include "lcd.h"
+ Include dependency graph for ili9341_params.h:

Go to the source code of this file.

Macros

#define ILI9341_PARAM_SCREEN_IDS   0
 Default screen identifiers.
 
#define ILI9341_NUMOF   ARRAY_SIZE(ili9341_params)
 Define the number of configured displays.
 
#define ILI9341_SCREEN_NUMOF   ARRAY_SIZE(ili9341_screen_ids)
 Define the number screens this display driver is attached to.
 

Variables

static const lcd_params_t ili9341_params []
 Configure ILI9341.
 
static const uint8_t ili9341_screen_ids []
 Configure screen identifiers.
 

Set default configuration parameters for the ILI9341

#define ILI9341_PARAM_SPI   SPI_DEV(0)
 
#define ILI9341_PARAM_SPI_CLK   SPI_CLK_5MHZ
 
#define ILI9341_PARAM_CS   GPIO_PIN(2, 2)
 
#define ILI9341_PARAM_DCX   GPIO_PIN(3, 13)
 
#define ILI9341_PARAM_RST   GPIO_UNDEF
 
#define ILI9341_PARAM_SPI_MODE   SPI_MODE_0
 
#define ILI9341_PARAM_RGB   0
 
#define ILI9341_PARAM_INVERTED   0
 
#define ILI9341_PARAM_NUM_LINES   320U
 Number of lines.
 
#define ILI9341_PARAM_RGB_CHANNELS   240U
 Number of RGB channels (e.g.
 
#define ILI9341_PARAM_ROTATION   ILI9341_ROTATION_HORZ_FLIP
 
#define ILI9341_PARAM_OFFSET_X   0
 Horizontal offset.
 
#define ILI9341_PARAM_OFFSET_Y   0
 Vertival offset.
 
#define ILI9341_PARAM_IF_SPI
 Default interface params if SPI serial interface is enabled.
 
#define ILI9341_PARAM_IF_PAR
 Default interface params if MCU 8080 8-bit parallel interface is enabled.
 
#define ILI9341_PARAM_IF_PAR_16BIT
 Additional default interface params if MCU 8080 16-bit parallel interface is enabled.
 
#define ILI9341_PARAM_IF_MODE   .mode = LCD_IF_PARALLEL_16BIT,
 Interface mode is MCU 8080 16-bit parallel.
 
#define ILI9341_PARAMS
 Default params.
 

Macro Definition Documentation

◆ ILI9341_NUMOF

#define ILI9341_NUMOF   ARRAY_SIZE(ili9341_params)

Define the number of configured displays.

Definition at line 180 of file ili9341_params.h.

◆ ILI9341_PARAM_CS

#define ILI9341_PARAM_CS   GPIO_PIN(2, 2)

Definition at line 41 of file ili9341_params.h.

◆ ILI9341_PARAM_DCX

#define ILI9341_PARAM_DCX   GPIO_PIN(3, 13)

Definition at line 44 of file ili9341_params.h.

◆ ILI9341_PARAM_IF_MODE

#define ILI9341_PARAM_IF_MODE   .mode = LCD_IF_PARALLEL_16BIT,

Interface mode is MCU 8080 16-bit parallel.

Definition at line 115 of file ili9341_params.h.

◆ ILI9341_PARAM_IF_PAR

#define ILI9341_PARAM_IF_PAR
Value:
.d0_pin = ILI9341_PARAM_D0, \
.d1_pin = ILI9341_PARAM_D1, \
.d2_pin = ILI9341_PARAM_D2, \
.d3_pin = ILI9341_PARAM_D3, \
.d4_pin = ILI9341_PARAM_D4, \
.d5_pin = ILI9341_PARAM_D5, \
.d6_pin = ILI9341_PARAM_D6, \
.d7_pin = ILI9341_PARAM_D7, \
.wrx_pin = ILI9341_PARAM_WRX, \
.rdx_pin = ILI9341_PARAM_RDX,

Default interface params if MCU 8080 8-bit parallel interface is enabled.

Definition at line 85 of file ili9341_params.h.

◆ ILI9341_PARAM_IF_PAR_16BIT

#define ILI9341_PARAM_IF_PAR_16BIT
Value:
.d8_pin = ILI9341_PARAM_D8, \
.d9_pin = ILI9341_PARAM_D9, \
.d10_pin = ILI9341_PARAM_D10, \
.d11_pin = ILI9341_PARAM_D11, \
.d12_pin = ILI9341_PARAM_D12, \
.d13_pin = ILI9341_PARAM_D13, \
.d14_pin = ILI9341_PARAM_D14, \
.d15_pin = ILI9341_PARAM_D15,

Additional default interface params if MCU 8080 16-bit parallel interface is enabled.

Definition at line 101 of file ili9341_params.h.

◆ ILI9341_PARAM_IF_SPI

#define ILI9341_PARAM_IF_SPI
Value:
.spi_clk = ILI9341_PARAM_SPI_CLK, \
.spi_mode = ILI9341_PARAM_SPI_MODE,
#define ILI9341_PARAM_SPI
SPI device.
Definition board.h:103

Default interface params if SPI serial interface is enabled.

Definition at line 76 of file ili9341_params.h.

◆ ILI9341_PARAM_INVERTED

#define ILI9341_PARAM_INVERTED   0

Definition at line 56 of file ili9341_params.h.

◆ ILI9341_PARAM_NUM_LINES

#define ILI9341_PARAM_NUM_LINES   320U

Number of lines.

Definition at line 59 of file ili9341_params.h.

◆ ILI9341_PARAM_OFFSET_X

#define ILI9341_PARAM_OFFSET_X   0

Horizontal offset.

Definition at line 68 of file ili9341_params.h.

◆ ILI9341_PARAM_OFFSET_Y

#define ILI9341_PARAM_OFFSET_Y   0

Vertival offset.

Definition at line 71 of file ili9341_params.h.

◆ ILI9341_PARAM_RGB

#define ILI9341_PARAM_RGB   0

Definition at line 53 of file ili9341_params.h.

◆ ILI9341_PARAM_RGB_CHANNELS

#define ILI9341_PARAM_RGB_CHANNELS   240U

Number of RGB channels (e.g.

columns)

Definition at line 62 of file ili9341_params.h.

◆ ILI9341_PARAM_ROTATION

#define ILI9341_PARAM_ROTATION   ILI9341_ROTATION_HORZ_FLIP

Definition at line 65 of file ili9341_params.h.

◆ ILI9341_PARAM_RST

#define ILI9341_PARAM_RST   GPIO_UNDEF

Definition at line 47 of file ili9341_params.h.

◆ ILI9341_PARAM_SCREEN_IDS

#define ILI9341_PARAM_SCREEN_IDS   0

Default screen identifiers.

Definition at line 166 of file ili9341_params.h.

◆ ILI9341_PARAM_SPI

#define ILI9341_PARAM_SPI   SPI_DEV(0)

Definition at line 35 of file ili9341_params.h.

◆ ILI9341_PARAM_SPI_CLK

#define ILI9341_PARAM_SPI_CLK   SPI_CLK_5MHZ

Definition at line 38 of file ili9341_params.h.

◆ ILI9341_PARAM_SPI_MODE

#define ILI9341_PARAM_SPI_MODE   SPI_MODE_0

Definition at line 50 of file ili9341_params.h.

◆ ILI9341_PARAMS

#define ILI9341_PARAMS
Value:
{ ILI9341_PARAM_IF_MODE \
ILI9341_PARAM_IF_SPI \
ILI9341_PARAM_IF_PAR \
ILI9341_PARAM_IF_PAR_16BIT \
.cs_pin = ILI9341_PARAM_CS, \
.dcx_pin = ILI9341_PARAM_DCX, \
.rst_pin = ILI9341_PARAM_RST, \
.inverted = ILI9341_PARAM_INVERTED, \
.rgb_channels = ILI9341_PARAM_RGB_CHANNELS, \
.rotation = ILI9341_PARAM_ROTATION, \
.offset_x = ILI9341_PARAM_OFFSET_X, \
.offset_y = ILI9341_PARAM_OFFSET_Y, \
}
#define ILI9341_PARAM_RST
Reset pin.
Definition board.h:106
#define ILI9341_PARAM_RGB
RGB configuration.
Definition board.h:108
#define ILI9341_PARAM_INVERTED
Inversion configuration.
Definition board.h:109
#define ILI9341_PARAM_CS
Chip select pin.
Definition board.h:104
#define ILI9341_PARAM_DCX
DCX pin.
Definition board.h:105
#define ILI9341_PARAM_ROTATION
Rotation mode.
Definition board.h:110
#define ILI9341_PARAM_RGB_CHANNELS
Number of RGB channels (e.g.
#define ILI9341_PARAM_OFFSET_Y
Vertival offset.
#define ILI9341_PARAM_NUM_LINES
Number of lines.
#define ILI9341_PARAM_OFFSET_X
Horizontal offset.

Default params.

Note
The default parameter set defined here can only be used if a single ILI9341 display and only one interface mode is used. If multiple ILI9341 displays are used or if multiple interface modes are enabled by the modules lcd_spi, lcd_parallel and lcd_parallel_16bit, a user defined parameter set ILI9341_PARAMS has to be defined. In the latter case lcd_params_t::spi must then be set to SPI_UNDEF for displays with MCU 8080 8-/16-bit parallel interfaces.

Definition at line 136 of file ili9341_params.h.

◆ ILI9341_SCREEN_NUMOF

#define ILI9341_SCREEN_NUMOF   ARRAY_SIZE(ili9341_screen_ids)

Define the number screens this display driver is attached to.

Definition at line 184 of file ili9341_params.h.

Variable Documentation

◆ ili9341_params

const lcd_params_t ili9341_params[]
static
Initial value:
=
{
}
#define ILI9341_PARAMS
Default params.

Configure ILI9341.

Definition at line 157 of file ili9341_params.h.

◆ ili9341_screen_ids

const uint8_t ili9341_screen_ids[]
static
Initial value:
=
{
}
#define ILI9341_PARAM_SCREEN_IDS
Default screen identifiers.

Configure screen identifiers.

Definition at line 172 of file ili9341_params.h.