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

Default configuration for ST77xx LCD controllers. More...

Detailed Description

Default configuration for ST77xx LCD controllers.

Author
Koen Zandberg koen@.nosp@m.berg.nosp@m.zand..nosp@m.net
Francisco Molina franc.nosp@m.ois-.nosp@m.xavie.nosp@m.r.mo.nosp@m.lina@.nosp@m.inri.nosp@m.a.fr
Gunar Schorcht gunar.nosp@m.@sch.nosp@m.orcht.nosp@m..net

Definition in file st77xx_params.h.

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

Go to the source code of this file.

Macros

#define ST77XX_PARAM_SCREEN_IDS   0
 Default screen identifiers.
 
#define ST77XX_NUMOF   ARRAY_SIZE(st77xx_params)
 Define the number of configured displays.
 
#define ST77XX_SCREEN_NUMOF   ARRAY_SIZE(st77xx_screen_ids)
 Define the number screens this display driver is attached to.
 

Variables

static const lcd_params_t st77xx_params []
 Configure LCD.
 
static const uint8_t st77xx_screen_ids []
 Configure screen identifiers.
 

Set default configuration parameters for the ST77xx

#define ST77XX_PARAM_CNTRL   ST77XX_CNTRL_ST7735
 ST77xx controller variant.
 
#define ST77XX_PARAM_SPI   SPI_DEV(0)
 SPI device.
 
#define ST77XX_PARAM_SPI_CLK   SPI_CLK_5MHZ
 SPI clock frequency.
 
#define ST77XX_PARAM_CS   GPIO_PIN(2, 2)
 Chip Select pin.
 
#define ST77XX_PARAM_DCX   GPIO_PIN(3, 13)
 DCX pin.
 
#define ST77XX_PARAM_RST   GPIO_UNDEF
 Reset pin.
 
#define ST77XX_PARAM_SPI_MODE   SPI_MODE_0
 SPI mode.
 
#define ST77XX_PARAM_RGB   0
 RGB mode enable.
 
#define ST77XX_PARAM_INVERTED   0
 Inverted mode enable.
 
#define ST77XX_PARAM_NUM_LINES   160U
 Number of lines.
 
#define ST77XX_PARAM_RGB_CHANNELS   128U
 Number of RGB channels (e.g.
 
#define ST77XX_PARAM_ROTATION   ST77XX_ROTATION_HORZ
 Rotation mode.
 
#define ST77XX_PARAM_OFFSET_X   0
 Horizontal offset.
 
#define ST77XX_PARAM_OFFSET_Y   0
 Vertival offset.
 
#define ST77XX_PARAM_IF_SPI
 Default interface params if SPI serial interface is enabled.
 
#define ST77XX_PARAM_IF_PAR
 Default interface params if MCU 8080 8-bit parallel interface is enabled.
 
#define ST77XX_PARAM_IF_PAR_16BIT
 Additional default interface params if MCU 8080 16-bit parallel interface is enabled.
 
#define ST77XX_PARAM_IF_MODE   .mode = LCD_IF_PARALLEL_16BIT,
 Interface mode is MCU 8080 16-bit parallel.
 
#define ST77XX_PARAMS
 Default params.
 

Macro Definition Documentation

◆ ST77XX_NUMOF

#define ST77XX_NUMOF   ARRAY_SIZE(st77xx_params)

Define the number of configured displays.

Definition at line 247 of file st77xx_params.h.

◆ ST77XX_PARAM_CNTRL

#define ST77XX_PARAM_CNTRL   ST77XX_CNTRL_ST7735

ST77xx controller variant.

Definition at line 98 of file st77xx_params.h.

◆ ST77XX_PARAM_CS

#define ST77XX_PARAM_CS   GPIO_PIN(2, 2)

Chip Select pin.

Definition at line 107 of file st77xx_params.h.

◆ ST77XX_PARAM_DCX

#define ST77XX_PARAM_DCX   GPIO_PIN(3, 13)

DCX pin.

Definition at line 110 of file st77xx_params.h.

◆ ST77XX_PARAM_IF_MODE

#define ST77XX_PARAM_IF_MODE   .mode = LCD_IF_PARALLEL_16BIT,

Interface mode is MCU 8080 16-bit parallel.

Definition at line 181 of file st77xx_params.h.

◆ ST77XX_PARAM_IF_PAR

#define ST77XX_PARAM_IF_PAR
Value:
.d0_pin = ST77XX_PARAM_D0, \
.d1_pin = ST77XX_PARAM_D1, \
.d2_pin = ST77XX_PARAM_D2, \
.d3_pin = ST77XX_PARAM_D3, \
.d4_pin = ST77XX_PARAM_D4, \
.d5_pin = ST77XX_PARAM_D5, \
.d6_pin = ST77XX_PARAM_D6, \
.d7_pin = ST77XX_PARAM_D7, \
.wrx_pin = ST77XX_PARAM_WRX, \
.rdx_pin = ST77XX_PARAM_RDX,
#define ST77XX_PARAM_D5
ST77xx D5 signal.
Definition board.h:91
#define ST77XX_PARAM_D6
ST77xx D6 signal.
Definition board.h:92
#define ST77XX_PARAM_D4
ST77xx D4 signal.
Definition board.h:90
#define ST77XX_PARAM_D1
ST77xx D1 signal.
Definition board.h:87
#define ST77XX_PARAM_D0
ST77xx D0 signal.
Definition board.h:86
#define ST77XX_PARAM_WRX
ST77xx WR signal.
Definition board.h:102
#define ST77XX_PARAM_D3
ST77xx D3 signal.
Definition board.h:89
#define ST77XX_PARAM_D7
ST77xx D7 signal.
Definition board.h:93
#define ST77XX_PARAM_D2
ST77xx D2 signal.
Definition board.h:88
#define ST77XX_PARAM_RDX
ST77xx RD signal.
Definition board.h:103

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

Definition at line 151 of file st77xx_params.h.

◆ ST77XX_PARAM_IF_PAR_16BIT

#define ST77XX_PARAM_IF_PAR_16BIT
Value:
.d8_pin = ST77XX_PARAM_D8, \
.d9_pin = ST77XX_PARAM_D9, \
.d10_pin = ST77XX_PARAM_D10, \
.d11_pin = ST77XX_PARAM_D11, \
.d12_pin = ST77XX_PARAM_D12, \
.d13_pin = ST77XX_PARAM_D13, \
.d14_pin = ST77XX_PARAM_D14, \
.d15_pin = ST77XX_PARAM_D15,
#define ST77XX_PARAM_D15
ST77xx D15 signal.
Definition board.h:101
#define ST77XX_PARAM_D11
ST77xx D11 signal.
Definition board.h:97
#define ST77XX_PARAM_D10
ST77xx D10 signal.
Definition board.h:96
#define ST77XX_PARAM_D8
ST77xx D8 signal.
Definition board.h:94
#define ST77XX_PARAM_D14
ST77xx D14 signal.
Definition board.h:100
#define ST77XX_PARAM_D12
ST77xx D12 signal.
Definition board.h:98
#define ST77XX_PARAM_D13
ST77xx D13 signal.
Definition board.h:99
#define ST77XX_PARAM_D9
ST77xx D9 signal.
Definition board.h:95

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

Definition at line 167 of file st77xx_params.h.

◆ ST77XX_PARAM_IF_SPI

#define ST77XX_PARAM_IF_SPI
Value:
.spi = ST77XX_PARAM_SPI, \
.spi_clk = ST77XX_PARAM_SPI_CLK, \
.spi_mode = ST77XX_PARAM_SPI_MODE,
#define ST77XX_PARAM_SPI_CLK
SPI clock frequency.
#define ST77XX_PARAM_SPI_MODE
SPI mode.
#define ST77XX_PARAM_SPI
SPI device.

Default interface params if SPI serial interface is enabled.

Definition at line 142 of file st77xx_params.h.

◆ ST77XX_PARAM_INVERTED

#define ST77XX_PARAM_INVERTED   0

Inverted mode enable.

Definition at line 122 of file st77xx_params.h.

◆ ST77XX_PARAM_NUM_LINES

#define ST77XX_PARAM_NUM_LINES   160U

Number of lines.

Definition at line 125 of file st77xx_params.h.

◆ ST77XX_PARAM_OFFSET_X

#define ST77XX_PARAM_OFFSET_X   0

Horizontal offset.

Definition at line 134 of file st77xx_params.h.

◆ ST77XX_PARAM_OFFSET_Y

#define ST77XX_PARAM_OFFSET_Y   0

Vertival offset.

Definition at line 137 of file st77xx_params.h.

◆ ST77XX_PARAM_RGB

#define ST77XX_PARAM_RGB   0

RGB mode enable.

Definition at line 119 of file st77xx_params.h.

◆ ST77XX_PARAM_RGB_CHANNELS

#define ST77XX_PARAM_RGB_CHANNELS   128U

Number of RGB channels (e.g.

columns)

Definition at line 128 of file st77xx_params.h.

◆ ST77XX_PARAM_ROTATION

#define ST77XX_PARAM_ROTATION   ST77XX_ROTATION_HORZ

Rotation mode.

Definition at line 131 of file st77xx_params.h.

◆ ST77XX_PARAM_RST

#define ST77XX_PARAM_RST   GPIO_UNDEF

Reset pin.

Definition at line 113 of file st77xx_params.h.

◆ ST77XX_PARAM_SCREEN_IDS

#define ST77XX_PARAM_SCREEN_IDS   0

Default screen identifiers.

Definition at line 225 of file st77xx_params.h.

◆ ST77XX_PARAM_SPI

#define ST77XX_PARAM_SPI   SPI_DEV(0)

SPI device.

Definition at line 101 of file st77xx_params.h.

◆ ST77XX_PARAM_SPI_CLK

#define ST77XX_PARAM_SPI_CLK   SPI_CLK_5MHZ

SPI clock frequency.

Definition at line 104 of file st77xx_params.h.

◆ ST77XX_PARAM_SPI_MODE

#define ST77XX_PARAM_SPI_MODE   SPI_MODE_0

SPI mode.

Definition at line 116 of file st77xx_params.h.

◆ ST77XX_PARAMS

#define ST77XX_PARAMS
Value:
{ ST77XX_PARAM_IF_MODE \
ST77XX_PARAM_IF_SPI \
ST77XX_PARAM_IF_PAR \
ST77XX_PARAM_IF_PAR_16BIT \
.cntrl = ST77XX_PARAM_CNTRL, \
.cs_pin = ST77XX_PARAM_CS, \
.dcx_pin = ST77XX_PARAM_DCX, \
.rst_pin = ST77XX_PARAM_RST, \
.rgb = ST77XX_PARAM_RGB, \
.inverted = ST77XX_PARAM_INVERTED, \
.rgb_channels = ST77XX_PARAM_RGB_CHANNELS, \
.rotation = ST77XX_PARAM_ROTATION, \
.offset_x = ST77XX_PARAM_OFFSET_X, \
.offset_y = ST77XX_PARAM_OFFSET_Y, \
}
#define ST77XX_PARAM_DCX
DCX pin.
#define ST77XX_PARAM_ROTATION
Rotation mode.
#define ST77XX_PARAM_OFFSET_Y
Vertival offset.
#define ST77XX_PARAM_OFFSET_X
Horizontal offset.
#define ST77XX_PARAM_INVERTED
Inverted mode enable.
#define ST77XX_PARAM_CS
Chip Select pin.
#define ST77XX_PARAM_NUM_LINES
Number of lines.
#define ST77XX_PARAM_RGB_CHANNELS
Number of RGB channels (e.g.
#define ST77XX_PARAM_RGB
RGB mode enable.
#define ST77XX_PARAM_RST
Reset pin.
#define ST77XX_PARAM_CNTRL
ST77xx controller variant.

Default params.

Note
The default parameter set defined here can only be used if a single ST77xx display and only one interface mode is used. If multiple ST77xx 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 ST77XX_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 202 of file st77xx_params.h.

◆ ST77XX_SCREEN_NUMOF

#define ST77XX_SCREEN_NUMOF   ARRAY_SIZE(st77xx_screen_ids)

Define the number screens this display driver is attached to.

Definition at line 251 of file st77xx_params.h.

Variable Documentation

◆ st77xx_params

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

Configure LCD.

Definition at line 231 of file st77xx_params.h.

◆ st77xx_screen_ids

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

Configure screen identifiers.

Definition at line 239 of file st77xx_params.h.