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

Board specific definitions for the STM32F723E-DISCO board. More...

Detailed Description

Board specific definitions for the STM32F723E-DISCO board.

Author
Alexandre Abadie alexa.nosp@m.ndre.nosp@m..abad.nosp@m.ie@i.nosp@m.nria..nosp@m.fr

Definition in file board.h.

#include "cpu.h"
#include "periph_conf.h"
#include "stm32_leds.h"
+ Include dependency graph for board.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

LCD Backlight control defines

#define BACKLIGHT_PIN   GPIO_PIN(PORT_H, 11)
 Backlight pin (HIGH active LD_BL)
 
#define BACKLIGHT_MASK   (1 << 11)
 Backlight pin mask.
 
#define BACKLIGHT_ON   (GPIOH->BSRR = BACKLIGHT_MASK)
 Set the backlight pin.
 
#define BACKLIGHT_OFF   (GPIOH->BSRR = (BACKLIGHT_MASK << 16))
 Clear the backlight pin.
 
#define BACKLIGHT_TOGGLE   (GPIOH->ODR ^= BACKLIGHT_MASK)
 Toggle the backlight pin.
 

LCD display definitions

The STM32F723G-DISCO board has a 240 x 240 pixel TFT color LCD display with ST7789H2 driver IC using the MCU 8080 16-bit parallel interface (default with SB15=ON and SB16=OFF).

SB15 and SB16 control the ST7789H2 IM0 signal. With SB15=OFF and SB16=ON, the MCU 8080 8-bit parallel interface is enabled.

For the LCD_* pins, please refer to the schematic.

#define LCD_SCREEN_WIDTH   240
 LCD width.
 
#define LCD_SCREEN_HEIGHT   240
 LCD height.
 
#define LCD_D0   GPIO_PIN(PORT_D, 14)
 LCD_D0 pin.
 
#define LCD_D1   GPIO_PIN(PORT_D, 15)
 LCD_D1 pin.
 
#define LCD_D2   GPIO_PIN(PORT_D, 0)
 LCD_D2 pin.
 
#define LCD_D3   GPIO_PIN(PORT_D, 1)
 LCD_D3 pin.
 
#define LCD_D4   GPIO_PIN(PORT_E, 7)
 LCD_D4 pin.
 
#define LCD_D5   GPIO_PIN(PORT_E, 8)
 LCD_D5 pin.
 
#define LCD_D6   GPIO_PIN(PORT_E, 9)
 LCD_D6 pin.
 
#define LCD_D7   GPIO_PIN(PORT_E, 10)
 LCD_D7 pin.
 
#define LCD_D8   GPIO_PIN(PORT_E, 11)
 LCD_D8 pin.
 
#define LCD_D9   GPIO_PIN(PORT_E, 12)
 LCD_D9 pin.
 
#define LCD_D10   GPIO_PIN(PORT_E, 13)
 LCD_D10 pin.
 
#define LCD_D11   GPIO_PIN(PORT_E, 14)
 LCD_D11 pin.
 
#define LCD_D12   GPIO_PIN(PORT_E, 15)
 LCD_D12 pin.
 
#define LCD_D13   GPIO_PIN(PORT_D, 8)
 LCD_D13 pin.
 
#define LCD_D14   GPIO_PIN(PORT_D, 9)
 LCD_D14 pin.
 
#define LCD_D15   GPIO_PIN(PORT_D, 10)
 LCD_D15 pin.
 
#define LCD_TE   GPIO_PIN(PORT_C, 8)
 LCD_TE pin.
 
#define LCD_WE   GPIO_PIN(PORT_D, 5)
 LCD_WE pin.
 
#define LCD_OE   GPIO_PIN(PORT_D, 4)
 LCD_OE pin.
 
#define LCD_RS   GPIO_PIN(PORT_F, 0)
 LCD_RS pin.
 
#define LCD_NE   GPIO_PIN(PORT_G, 9)
 LCD_NE pin.
 
#define LCD_RST   GPIO_PIN(PORT_H, 7)
 LCD_RST pin.
 
#define LCD_BACKLIGHT   BACKLIGHT_PIN
 LCD_BL pin.
 
#define ST77XX_PARAM_CNTRL   ST77XX_CNTRL_ST7789
 ST77xx controller variant.
 
#define ST77XX_PARAM_SPI   SPI_UNDEF
 parallel interface is used
 
#define ST77XX_PARAM_D0   LCD_D0
 ST77xx D0 signal.
 
#define ST77XX_PARAM_D1   LCD_D1
 ST77xx D1 signal.
 
#define ST77XX_PARAM_D2   LCD_D2
 ST77xx D2 signal.
 
#define ST77XX_PARAM_D3   LCD_D3
 ST77xx D3 signal.
 
#define ST77XX_PARAM_D4   LCD_D4
 ST77xx D4 signal.
 
#define ST77XX_PARAM_D5   LCD_D5
 ST77xx D5 signal.
 
#define ST77XX_PARAM_D6   LCD_D6
 ST77xx D6 signal.
 
#define ST77XX_PARAM_D7   LCD_D7
 ST77xx D7 signal.
 
#define ST77XX_PARAM_D8   LCD_D8
 ST77xx D8 signal.
 
#define ST77XX_PARAM_D9   LCD_D9
 ST77xx D9 signal.
 
#define ST77XX_PARAM_D10   LCD_D10
 ST77xx D10 signal.
 
#define ST77XX_PARAM_D11   LCD_D11
 ST77xx D11 signal.
 
#define ST77XX_PARAM_D12   LCD_D12
 ST77xx D12 signal.
 
#define ST77XX_PARAM_D13   LCD_D13
 ST77xx D13 signal.
 
#define ST77XX_PARAM_D14   LCD_D14
 ST77xx D14 signal.
 
#define ST77XX_PARAM_D15   LCD_D15
 ST77xx D15 signal.
 
#define ST77XX_PARAM_WRX   LCD_WE
 ST77xx WR signal.
 
#define ST77XX_PARAM_RDX   LCD_OE
 ST77xx RD signal.
 
#define ST77XX_PARAM_DCX   LCD_RS
 ST77xx RS signal.
 
#define ST77XX_PARAM_RST   LCD_RST
 ST77xx RST signal.
 
#define ST77XX_PARAM_CS   LCD_NE
 ST77xx CS signal.
 
#define ST77XX_PARAM_RGB   1
 ST77xx RGB mode.
 
#define ST77XX_PARAM_INVERTED   1
 ST77xx inverted colors.
 
#define ST77XX_PARAM_ROTATION   ST77XX_ROTATION_90
 ST77xx rotation.
 
#define ST77XX_PARAM_OFFSET_X   80
 ST77xx offset because of rotation.
 
#define ST77XX_PARAM_NUM_LINES   LCD_SCREEN_HEIGHT
 ST77xx number of lines.
 
#define ST77XX_PARAM_RGB_CHANNELS   LCD_SCREEN_WIDTH
 ST77xx number of channels.
 

Macros for controlling the on-board LEDs.

#define LED0_PIN_NUM   5
 
#define LED0_PORT   GPIO_PORT_A
 GPIO port of LED 0.
 
#define LED0_PORT_NUM   PORT_A
 
#define LED1_PIN_NUM   7
 
#define LED1_PORT   GPIO_PORT_A
 GPIO port of LED 1.
 
#define LED1_PORT_NUM   PORT_A
 
#define LED2_PIN_NUM   1
 
#define LED2_PORT   GPIO_PORT_B
 GPIO port of LED 2.
 
#define LED2_PORT_NUM   PORT_B
 

User button

#define BTN0_PIN   GPIO_PIN(PORT_A, 0)
 
#define BTN0_MODE   GPIO_IN
 

FT5X06 touch panel configuration

#define FT5X06_PARAM_I2C_DEV   I2C_DEV(1)
 I2C device.
 
#define FT5X06_PARAM_INT_PIN   GPIO_PIN(PORT_I, 9)
 Interrupt pin.
 
#define FT5X06_PARAM_XMAX   (240)
 Max width.
 
#define FT5X06_PARAM_YMAX   (240)
 Max height.
 
#define FT5X06_PARAM_XYCONV   FT5X06_NO_CONV
 No coordinate conversion.
 
#define FT5X06_PARAM_TYPE   FT5X06_TYPE_FT6X06
 Device type.
 

Macro Definition Documentation

◆ BACKLIGHT_MASK

#define BACKLIGHT_MASK   (1 << 11)

Backlight pin mask.

Definition at line 34 of file board.h.

◆ BACKLIGHT_OFF

#define BACKLIGHT_OFF   (GPIOH->BSRR = (BACKLIGHT_MASK << 16))

Clear the backlight pin.

Definition at line 39 of file board.h.

◆ BACKLIGHT_ON

#define BACKLIGHT_ON   (GPIOH->BSRR = BACKLIGHT_MASK)

Set the backlight pin.

Definition at line 37 of file board.h.

◆ BACKLIGHT_PIN

#define BACKLIGHT_PIN   GPIO_PIN(PORT_H, 11)

Backlight pin (HIGH active LD_BL)

Definition at line 33 of file board.h.

◆ BACKLIGHT_TOGGLE

#define BACKLIGHT_TOGGLE   (GPIOH->ODR ^= BACKLIGHT_MASK)

Toggle the backlight pin.

Definition at line 41 of file board.h.

◆ BTN0_MODE

#define BTN0_MODE   GPIO_IN

Definition at line 137 of file board.h.

◆ BTN0_PIN

#define BTN0_PIN   GPIO_PIN(PORT_A, 0)

Definition at line 136 of file board.h.

◆ FT5X06_PARAM_I2C_DEV

#define FT5X06_PARAM_I2C_DEV   I2C_DEV(1)

I2C device.

Definition at line 144 of file board.h.

◆ FT5X06_PARAM_INT_PIN

#define FT5X06_PARAM_INT_PIN   GPIO_PIN(PORT_I, 9)

Interrupt pin.

Definition at line 145 of file board.h.

◆ FT5X06_PARAM_TYPE

#define FT5X06_PARAM_TYPE   FT5X06_TYPE_FT6X06

Device type.

Definition at line 149 of file board.h.

◆ FT5X06_PARAM_XMAX

#define FT5X06_PARAM_XMAX   (240)

Max width.

Definition at line 146 of file board.h.

◆ FT5X06_PARAM_XYCONV

#define FT5X06_PARAM_XYCONV   FT5X06_NO_CONV

No coordinate conversion.

Definition at line 148 of file board.h.

◆ FT5X06_PARAM_YMAX

#define FT5X06_PARAM_YMAX   (240)

Max height.

Definition at line 147 of file board.h.

◆ LCD_BACKLIGHT

#define LCD_BACKLIGHT   BACKLIGHT_PIN

LCD_BL pin.

Definition at line 82 of file board.h.

◆ LCD_D0

#define LCD_D0   GPIO_PIN(PORT_D, 14)

LCD_D0 pin.

Definition at line 60 of file board.h.

◆ LCD_D1

#define LCD_D1   GPIO_PIN(PORT_D, 15)

LCD_D1 pin.

Definition at line 61 of file board.h.

◆ LCD_D10

#define LCD_D10   GPIO_PIN(PORT_E, 13)

LCD_D10 pin.

Definition at line 70 of file board.h.

◆ LCD_D11

#define LCD_D11   GPIO_PIN(PORT_E, 14)

LCD_D11 pin.

Definition at line 71 of file board.h.

◆ LCD_D12

#define LCD_D12   GPIO_PIN(PORT_E, 15)

LCD_D12 pin.

Definition at line 72 of file board.h.

◆ LCD_D13

#define LCD_D13   GPIO_PIN(PORT_D, 8)

LCD_D13 pin.

Definition at line 73 of file board.h.

◆ LCD_D14

#define LCD_D14   GPIO_PIN(PORT_D, 9)

LCD_D14 pin.

Definition at line 74 of file board.h.

◆ LCD_D15

#define LCD_D15   GPIO_PIN(PORT_D, 10)

LCD_D15 pin.

Definition at line 75 of file board.h.

◆ LCD_D2

#define LCD_D2   GPIO_PIN(PORT_D, 0)

LCD_D2 pin.

Definition at line 62 of file board.h.

◆ LCD_D3

#define LCD_D3   GPIO_PIN(PORT_D, 1)

LCD_D3 pin.

Definition at line 63 of file board.h.

◆ LCD_D4

#define LCD_D4   GPIO_PIN(PORT_E, 7)

LCD_D4 pin.

Definition at line 64 of file board.h.

◆ LCD_D5

#define LCD_D5   GPIO_PIN(PORT_E, 8)

LCD_D5 pin.

Definition at line 65 of file board.h.

◆ LCD_D6

#define LCD_D6   GPIO_PIN(PORT_E, 9)

LCD_D6 pin.

Definition at line 66 of file board.h.

◆ LCD_D7

#define LCD_D7   GPIO_PIN(PORT_E, 10)

LCD_D7 pin.

Definition at line 67 of file board.h.

◆ LCD_D8

#define LCD_D8   GPIO_PIN(PORT_E, 11)

LCD_D8 pin.

Definition at line 68 of file board.h.

◆ LCD_D9

#define LCD_D9   GPIO_PIN(PORT_E, 12)

LCD_D9 pin.

Definition at line 69 of file board.h.

◆ LCD_NE

#define LCD_NE   GPIO_PIN(PORT_G, 9)

LCD_NE pin.

Definition at line 80 of file board.h.

◆ LCD_OE

#define LCD_OE   GPIO_PIN(PORT_D, 4)

LCD_OE pin.

Definition at line 78 of file board.h.

◆ LCD_RS

#define LCD_RS   GPIO_PIN(PORT_F, 0)

LCD_RS pin.

Definition at line 79 of file board.h.

◆ LCD_RST

#define LCD_RST   GPIO_PIN(PORT_H, 7)

LCD_RST pin.

Definition at line 81 of file board.h.

◆ LCD_SCREEN_HEIGHT

#define LCD_SCREEN_HEIGHT   240

LCD height.

Definition at line 58 of file board.h.

◆ LCD_SCREEN_WIDTH

#define LCD_SCREEN_WIDTH   240

LCD width.

Definition at line 57 of file board.h.

◆ LCD_TE

#define LCD_TE   GPIO_PIN(PORT_C, 8)

LCD_TE pin.

Definition at line 76 of file board.h.

◆ LCD_WE

#define LCD_WE   GPIO_PIN(PORT_D, 5)

LCD_WE pin.

Definition at line 77 of file board.h.

◆ LED0_PIN_NUM

#define LED0_PIN_NUM   5

Definition at line 119 of file board.h.

◆ LED0_PORT

#define LED0_PORT   GPIO_PORT_A

GPIO port of LED 0.

Definition at line 120 of file board.h.

◆ LED0_PORT_NUM

#define LED0_PORT_NUM   PORT_A

Definition at line 121 of file board.h.

◆ LED1_PIN_NUM

#define LED1_PIN_NUM   7

Definition at line 123 of file board.h.

◆ LED1_PORT

#define LED1_PORT   GPIO_PORT_A

GPIO port of LED 1.

Definition at line 124 of file board.h.

◆ LED1_PORT_NUM

#define LED1_PORT_NUM   PORT_A

Definition at line 125 of file board.h.

◆ LED2_PIN_NUM

#define LED2_PIN_NUM   1

Definition at line 127 of file board.h.

◆ LED2_PORT

#define LED2_PORT   GPIO_PORT_B

GPIO port of LED 2.

Definition at line 128 of file board.h.

◆ LED2_PORT_NUM

#define LED2_PORT_NUM   PORT_B

Definition at line 129 of file board.h.

◆ ST77XX_PARAM_CNTRL

#define ST77XX_PARAM_CNTRL   ST77XX_CNTRL_ST7789

ST77xx controller variant.

Definition at line 84 of file board.h.

◆ ST77XX_PARAM_CS

#define ST77XX_PARAM_CS   LCD_NE

ST77xx CS signal.

Definition at line 106 of file board.h.

◆ ST77XX_PARAM_D0

#define ST77XX_PARAM_D0   LCD_D0

ST77xx D0 signal.

Definition at line 86 of file board.h.

◆ ST77XX_PARAM_D1

#define ST77XX_PARAM_D1   LCD_D1

ST77xx D1 signal.

Definition at line 87 of file board.h.

◆ ST77XX_PARAM_D10

#define ST77XX_PARAM_D10   LCD_D10

ST77xx D10 signal.

Definition at line 96 of file board.h.

◆ ST77XX_PARAM_D11

#define ST77XX_PARAM_D11   LCD_D11

ST77xx D11 signal.

Definition at line 97 of file board.h.

◆ ST77XX_PARAM_D12

#define ST77XX_PARAM_D12   LCD_D12

ST77xx D12 signal.

Definition at line 98 of file board.h.

◆ ST77XX_PARAM_D13

#define ST77XX_PARAM_D13   LCD_D13

ST77xx D13 signal.

Definition at line 99 of file board.h.

◆ ST77XX_PARAM_D14

#define ST77XX_PARAM_D14   LCD_D14

ST77xx D14 signal.

Definition at line 100 of file board.h.

◆ ST77XX_PARAM_D15

#define ST77XX_PARAM_D15   LCD_D15

ST77xx D15 signal.

Definition at line 101 of file board.h.

◆ ST77XX_PARAM_D2

#define ST77XX_PARAM_D2   LCD_D2

ST77xx D2 signal.

Definition at line 88 of file board.h.

◆ ST77XX_PARAM_D3

#define ST77XX_PARAM_D3   LCD_D3

ST77xx D3 signal.

Definition at line 89 of file board.h.

◆ ST77XX_PARAM_D4

#define ST77XX_PARAM_D4   LCD_D4

ST77xx D4 signal.

Definition at line 90 of file board.h.

◆ ST77XX_PARAM_D5

#define ST77XX_PARAM_D5   LCD_D5

ST77xx D5 signal.

Definition at line 91 of file board.h.

◆ ST77XX_PARAM_D6

#define ST77XX_PARAM_D6   LCD_D6

ST77xx D6 signal.

Definition at line 92 of file board.h.

◆ ST77XX_PARAM_D7

#define ST77XX_PARAM_D7   LCD_D7

ST77xx D7 signal.

Definition at line 93 of file board.h.

◆ ST77XX_PARAM_D8

#define ST77XX_PARAM_D8   LCD_D8

ST77xx D8 signal.

Definition at line 94 of file board.h.

◆ ST77XX_PARAM_D9

#define ST77XX_PARAM_D9   LCD_D9

ST77xx D9 signal.

Definition at line 95 of file board.h.

◆ ST77XX_PARAM_DCX

#define ST77XX_PARAM_DCX   LCD_RS

ST77xx RS signal.

Definition at line 104 of file board.h.

◆ ST77XX_PARAM_INVERTED

#define ST77XX_PARAM_INVERTED   1

ST77xx inverted colors.

Definition at line 108 of file board.h.

◆ ST77XX_PARAM_NUM_LINES

#define ST77XX_PARAM_NUM_LINES   LCD_SCREEN_HEIGHT

ST77xx number of lines.

Definition at line 111 of file board.h.

◆ ST77XX_PARAM_OFFSET_X

#define ST77XX_PARAM_OFFSET_X   80

ST77xx offset because of rotation.

Definition at line 110 of file board.h.

◆ ST77XX_PARAM_RDX

#define ST77XX_PARAM_RDX   LCD_OE

ST77xx RD signal.

Definition at line 103 of file board.h.

◆ ST77XX_PARAM_RGB

#define ST77XX_PARAM_RGB   1

ST77xx RGB mode.

Definition at line 107 of file board.h.

◆ ST77XX_PARAM_RGB_CHANNELS

#define ST77XX_PARAM_RGB_CHANNELS   LCD_SCREEN_WIDTH

ST77xx number of channels.

Definition at line 112 of file board.h.

◆ ST77XX_PARAM_ROTATION

#define ST77XX_PARAM_ROTATION   ST77XX_ROTATION_90

ST77xx rotation.

Definition at line 109 of file board.h.

◆ ST77XX_PARAM_RST

#define ST77XX_PARAM_RST   LCD_RST

ST77xx RST signal.

Definition at line 105 of file board.h.

◆ ST77XX_PARAM_SPI

#define ST77XX_PARAM_SPI   SPI_UNDEF

parallel interface is used

Definition at line 85 of file board.h.

◆ ST77XX_PARAM_WRX

#define ST77XX_PARAM_WRX   LCD_WE

ST77xx WR signal.

Definition at line 102 of file board.h.