11/* *
2- * @file config .h
2+ * @file config_lcd .h
33 *
44 */
55/* Copyright (C) 2022-2026 by Arjan van Vught mailto:info@gd32-dmx.org
2828
2929#include < cstdint>
3030
31- namespace config {
31+ namespace config ::lcd {
3232#if defined(SPI_LCD_240X240)
3333inline constexpr uint32_t kWidth = 240 ;
3434inline constexpr uint32_t kHeight = 240 ;
@@ -44,38 +44,38 @@ inline constexpr uint32_t kHeight = 160;
4444#else
4545#error lib-display spi config
4646#endif
47- } // namespace config
47+ } // namespace config::lcd
4848
4949#if defined(H3)
50- #define SPI_LCD_RST_GPIO GPIO_EXT_7 // GPIO6
51- #define SPI_LCD_DC_GPIO GPIO_EXT_26 // GPIO10
52- #define SPI_LCD_BL_GPIO GPIO_EXT_22 // GPIO2
50+ #define SPI_LCD_RST_GPIO GPIO_EXT_7 // GPIO6
51+ #define SPI_LCD_DC_GPIO GPIO_EXT_26 // GPIO10
52+ #define SPI_LCD_BL_GPIO GPIO_EXT_22 // GPIO2
5353#if defined(SPI_LCD_HAVE_CS_GPIO)
54- #define SPI_LCD_CS_GPIO GPIO_EXT_24 // GPIO13 / SPI CS0
55- #endif // defined(SPI_LCD_HAVE_CS_GPIO)
56- #elif defined(GD32) // See board file
54+ #define SPI_LCD_CS_GPIO GPIO_EXT_24 // GPIO13 / SPI CS0
55+ #endif // defined(SPI_LCD_HAVE_CS_GPIO)
56+ #elif defined(GD32) // See board file
5757#elif defined(RASPPI)
5858#include " gpio_rasppi.h"
59- #define SPI_LCD_RST_GPIO GPIO_EXT_7 // GPIO4
60- #define SPI_LCD_DC_GPIO GPIO_EXT_31 // GPIO6
61- #define SPI_LCD_BL_GPIO GPIO_EXT_29 // GPIO5
59+ #define SPI_LCD_RST_GPIO GPIO_EXT_7 // GPIO4
60+ #define SPI_LCD_DC_GPIO GPIO_EXT_31 // GPIO6
61+ #define SPI_LCD_BL_GPIO GPIO_EXT_29 // GPIO5
6262#if defined(SPI_LCD_HAVE_CS_GPIO)
63- #define SPI_LCD_CS_GPIO GPIO_EXT_22 // GPIO25
64- #endif // defined(SPI_LCD_HAVE_CS_GPIO)
63+ #define SPI_LCD_CS_GPIO GPIO_EXT_22 // GPIO25
64+ #endif // defined(SPI_LCD_HAVE_CS_GPIO)
6565#elif defined(ODROID)
6666#include " gpio_odroid.h"
67- #define SPI_LCD_RST_GPIO GPIO_EXT_7 // GPIO4
68- #define SPI_LCD_DC_GPIO GPIO_EXT_31 // GPIO6
69- #define SPI_LCD_BL_GPIO GPIO_EXT_29 // GPIO5
67+ #define SPI_LCD_RST_GPIO GPIO_EXT_7 // GPIO4
68+ #define SPI_LCD_DC_GPIO GPIO_EXT_31 // GPIO6
69+ #define SPI_LCD_BL_GPIO GPIO_EXT_29 // GPIO5
7070#if defined(SPI_LCD_HAVE_CS_GPIO)
71- #define SPI_LCD_CS_GPIO GPIO_EXT_22 // GPIO25
72- #endif // defined(SPI_LCD_HAVE_CS_GPIO)
71+ #define SPI_LCD_CS_GPIO GPIO_EXT_22 // GPIO25
72+ #endif // defined(SPI_LCD_HAVE_CS_GPIO)
7373#else
74- #define SPI_LCD_RST_GPIO 0
75- #define SPI_LCD_DC_GPIO 0
76- #define SPI_LCD_BL_GPIO 0
74+ #define SPI_LCD_RST_GPIO 0
75+ #define SPI_LCD_DC_GPIO 0
76+ #define SPI_LCD_BL_GPIO 0
7777#if defined(SPI_LCD_HAVE_CS_GPIO)
78- #define SPI_LCD_CS_GPIO 0
78+ #define SPI_LCD_CS_GPIO 0
7979#endif // defined(SPI_LCD_HAVE_CS_GPIO)
8080#endif
8181
0 commit comments