Indent the define statement by two spaces

follow the code style convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2023-05-20 06:32:34 +08:00
committed by Alan Carvalho de Assis
parent ae1fd83a46
commit 7990f90915
390 changed files with 4060 additions and 4063 deletions
@@ -398,10 +398,10 @@ static inline void lcd_gramselect(void)
static void lcd_setcursor(unsigned int x, unsigned int y)
{
#if defined(CONFIG_LCD_PORTRAIT) || defined (CONFIG_LCD_RPORTRAIT)
# if defined (CONFIG_LCD_RPORTRAIT)
# if defined (CONFIG_LCD_RPORTRAIT)
x = (LCD_XRES - 1) - x;
y = (LCD_YRES - 1) - y;
# endif
# endif
write_reg(0x20, x); /* Row */
write_reg(0x21, y); /* Line */
#endif
@@ -266,8 +266,8 @@
* -- ----- --------- -----
*/
# define GPIO_USART6_RX GPIO_USART6_RX_2
# define GPIO_USART6_TX GPIO_USART6_TX_2
# define GPIO_USART6_RX GPIO_USART6_RX_2
# define GPIO_USART6_TX GPIO_USART6_TX_2
#endif
/* USART3:
@@ -275,8 +275,8 @@
*/
#if defined(CONFIG_NUCLEO_F429ZI_CONSOLE_VIRTUAL)
# define GPIO_USART3_RX GPIO_USART3_RX_3
# define GPIO_USART3_TX GPIO_USART3_TX_3
# define GPIO_USART3_RX GPIO_USART3_RX_3
# define GPIO_USART3_TX GPIO_USART3_TX_3
#endif
/* DMA channels *************************************************************/
@@ -99,7 +99,7 @@
#define GPIO_SPI3_CS3 (GPIO_SPI_CS | GPIO_PORTG | GPIO_PIN7)
#if defined(CONFIG_STM32_SDMMC1) || defined(CONFIG_STM32_SDMMC2)
# define HAVE_SDIO
# define HAVE_SDIO
#endif
#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_MMCSD_SDIO)
+39 -39
View File
@@ -58,7 +58,7 @@
# define CONFIG_NUCLEO_SPI1_TEST_MODE SPIDEV_MODE3
# else
# error "No CONFIG_NUCLEO_SPI1_TEST_MODEx defined"
# endif
# endif
#endif
#if defined(CONFIG_NUCLEO_SPI2_TEST)
@@ -72,7 +72,7 @@
# define CONFIG_NUCLEO_SPI2_TEST_MODE SPIDEV_MODE3
# else
# error "No CONFIG_NUCLEO_SPI2_TEST_MODEx defined"
# endif
# endif
#endif
#if defined(CONFIG_NUCLEO_SPI3_TEST)
@@ -86,7 +86,7 @@
# define CONFIG_NUCLEO_SPI3_TEST_MODE SPIDEV_MODE3
# else
# error "No CONFIG_NUCLEO_SPI3_TEST_MODEx defined"
# endif
# endif
#endif
/****************************************************************************
@@ -96,78 +96,78 @@
#if defined(CONFIG_STM32_SPI1)
static const uint32_t g_spi1gpio[] =
{
#if defined(GPIO_SPI1_CS0)
# if defined(GPIO_SPI1_CS0)
GPIO_SPI1_CS0,
#else
# else
0,
#endif
#if defined(GPIO_SPI1_CS1)
# endif
# if defined(GPIO_SPI1_CS1)
GPIO_SPI1_CS1,
#else
# else
0,
#endif
#if defined(GPIO_SPI1_CS2)
# endif
# if defined(GPIO_SPI1_CS2)
GPIO_SPI1_CS2,
#else
# else
0,
#endif
#if defined(GPIO_SPI1_CS3)
# endif
# if defined(GPIO_SPI1_CS3)
GPIO_SPI1_CS3
#else
# else
0
#endif
# endif
};
#endif
#if defined(CONFIG_STM32_SPI2)
static const uint32_t g_spi2gpio[] =
{
#if defined(GPIO_SPI2_CS0)
# if defined(GPIO_SPI2_CS0)
GPIO_SPI2_CS0,
#else
# else
0,
#endif
#if defined(GPIO_SPI2_CS1)
# endif
# if defined(GPIO_SPI2_CS1)
GPIO_SPI2_CS1,
#else
# else
0,
#endif
#if defined(GPIO_SPI2_CS2)
# endif
# if defined(GPIO_SPI2_CS2)
GPIO_SPI2_CS2,
#else
# else
0,
#endif
#if defined(GPIO_SPI2_CS3)
# endif
# if defined(GPIO_SPI2_CS3)
GPIO_SPI2_CS3
#else
# else
0
#endif
# endif
};
#endif
#if defined(CONFIG_STM32_SPI3)
static const uint32_t g_spi3gpio[] =
{
#if defined(GPIO_SPI3_CS0)
# if defined(GPIO_SPI3_CS0)
GPIO_SPI3_CS0,
#else
# else
0,
#endif
#if defined(GPIO_SPI3_CS1)
# endif
# if defined(GPIO_SPI3_CS1)
GPIO_SPI3_CS1,
#else
# else
0,
#endif
#if defined(GPIO_SPI3_CS2)
# endif
# if defined(GPIO_SPI3_CS2)
GPIO_SPI3_CS2,
#else
# else
0,
#endif
#if defined(GPIO_SPI3_CS3)
# endif
# if defined(GPIO_SPI3_CS3)
GPIO_SPI3_CS3
#else
# else
0
#endif
# endif
};
#endif
@@ -1004,9 +1004,9 @@ static int stm3210e_poweroff(void)
/* Disable timer 1 clocking */
#if defined(CONFIG_STM3210E_LCD_BACKLIGHT)
# if defined(CONFIG_STM3210E_LCD_PWM)
# if defined(CONFIG_STM3210E_LCD_PWM)
modifyreg32(STM32_RCC_APB2ENR, RCC_APB2ENR_TIM1EN, 0);
#endif
# endif
/* Configure the PA8 pin as an output */
@@ -978,13 +978,13 @@ static inline void stm3220g_lcdinitialize(void)
/* Save the LCD type (not actually used at for anything important) */
#if !defined(CONFIG_STM32_ILI9320_DISABLE)
# if !defined(CONFIG_STM32_ILI9325_DISABLE)
# if !defined(CONFIG_STM32_ILI9325_DISABLE)
if (id == ILI9325_ID)
{
g_lcddev.type = LCD_TYPE_ILI9325;
}
else
# endif
# endif
{
g_lcddev.type = LCD_TYPE_ILI9320;
stm3220g_writereg(LCD_REG_229, 0x8000); /* Set the internal vcore voltage */
@@ -1038,9 +1038,9 @@ static inline void stm3220g_lcdinitialize(void)
/* Adjust the Gamma Curve (ILI9320/1) */
#if !defined(CONFIG_STM32_ILI9320_DISABLE)
# if !defined(CONFIG_STM32_ILI9325_DISABLE)
# if !defined(CONFIG_STM32_ILI9325_DISABLE)
if (g_lcddev.type == LCD_TYPE_ILI9320)
# endif
# endif
{
stm3220g_writereg(LCD_REG_48, 0x0006);
stm3220g_writereg(LCD_REG_49, 0x0101);
@@ -1058,9 +1058,9 @@ static inline void stm3220g_lcdinitialize(void)
/* Adjust the Gamma Curve (ILI9325) */
#if !defined(CONFIG_STM32_ILI9325_DISABLE)
# if !defined(CONFIG_STM32_ILI9320_DISABLE)
# if !defined(CONFIG_STM32_ILI9320_DISABLE)
else
# endif
# endif
{
stm3220g_writereg(LCD_REG_48, 0x0007);
stm3220g_writereg(LCD_REG_49, 0x0302);
@@ -981,13 +981,13 @@ static inline void stm3240g_lcdinitialize(void)
*/
#if !defined(CONFIG_STM3240G_ILI9320_DISABLE)
# if !defined(CONFIG_STM3240G_ILI9325_DISABLE)
# if !defined(CONFIG_STM3240G_ILI9325_DISABLE)
if (id == ILI9325_ID)
{
g_lcddev.type = LCD_TYPE_ILI9325;
}
else
# endif
# endif
{
g_lcddev.type = LCD_TYPE_ILI9320;
stm3240g_writereg(LCD_REG_229, 0x8000); /* Set the internal vcore voltage */
@@ -1041,9 +1041,9 @@ static inline void stm3240g_lcdinitialize(void)
/* Adjust the Gamma Curve (ILI9320/1) */
#if !defined(CONFIG_STM3240G_ILI9320_DISABLE)
# if !defined(CONFIG_STM3240G_ILI9325_DISABLE)
# if !defined(CONFIG_STM3240G_ILI9325_DISABLE)
if (g_lcddev.type == LCD_TYPE_ILI9320)
# endif
# endif
{
stm3240g_writereg(LCD_REG_48, 0x0006);
stm3240g_writereg(LCD_REG_49, 0x0101);
@@ -1061,9 +1061,9 @@ static inline void stm3240g_lcdinitialize(void)
/* Adjust the Gamma Curve (ILI9325) */
#if !defined(CONFIG_STM3240G_ILI9325_DISABLE)
# if !defined(CONFIG_STM3240G_ILI9320_DISABLE)
# if !defined(CONFIG_STM3240G_ILI9320_DISABLE)
else
# endif
# endif
{
stm3240g_writereg(LCD_REG_48, 0x0007);
stm3240g_writereg(LCD_REG_49, 0x0302);
@@ -123,11 +123,11 @@
#endif
#ifdef CONFIG_SENSORS_HYT271
# define HAVE_SENSORS_DEVICE
# define HAVE_SENSORS_DEVICE
#endif
#ifdef CONFIG_SENSORS_DS18B20
# define HAVE_SENSORS_DEVICE
# define HAVE_SENSORS_DEVICE
#endif
#ifdef CONFIG_LCD_BACKPACK
@@ -49,7 +49,7 @@
#define LCD_SPI_PORTNO 1 /* On SPI1 */
#ifndef CONFIG_LCD_CONTRAST
# define CONFIG_LCD_CONTRAST 0x1f
# define CONFIG_LCD_CONTRAST 0x1f
#endif
/****************************************************************************
@@ -48,7 +48,7 @@
#define LCD_SPI_PORTNO 1 /* On SPI1 */
#ifndef CONFIG_LCD_CONTRAST
# define CONFIG_LCD_CONTRAST 60
# define CONFIG_LCD_CONTRAST 60
#endif
/****************************************************************************
@@ -300,11 +300,11 @@
#if defined(CONFIG_STM32F429I_DISCO_ILI9341_FBIFACE_LANDSCAPE) || \
defined(CONFIG_STM32F429I_DISCO_ILI9341_FBIFACE_RLANDSCAPE)
# define BOARD_LTDC_WIDTH 320
# define BOARD_LTDC_HEIGHT 240
# define BOARD_LTDC_WIDTH 320
# define BOARD_LTDC_HEIGHT 240
#else
# define BOARD_LTDC_WIDTH 240
# define BOARD_LTDC_HEIGHT 320
# define BOARD_LTDC_WIDTH 240
# define BOARD_LTDC_HEIGHT 320
#endif
#define BOARD_LTDC_OUTPUT_BPP 16
@@ -372,8 +372,8 @@
#else
/* Custom LCD display configuration */
# define BOARD_LTDC_WIDTH ???
# define BOARD_LTDC_HEIGHT ???
# define BOARD_LTDC_WIDTH ???
# define BOARD_LTDC_HEIGHT ???
#define BOARD_LTDC_HFP ???
#define BOARD_LTDC_HBP ???
@@ -44,9 +44,9 @@
****************************************************************************/
#ifdef CONFIG_STM32F429I_DISCO_ILI9341_LCDDEVICE
# define ILI9341_LCD_DEVICE CONFIG_STM32F429I_DISCO_ILI9341_LCDDEVICE
# define ILI9341_LCD_DEVICE CONFIG_STM32F429I_DISCO_ILI9341_LCDDEVICE
#else
# define ILI9341_LCD_DEVICE 0
# define ILI9341_LCD_DEVICE 0
#endif
#ifdef CONFIG_STM32F429I_DISCO_ILI9341_FBIFACE
@@ -234,15 +234,15 @@
/* Set the display orientation */
#if defined(CONFIG_STM32F429I_DISCO_ILI9341_FBIFACE_LANDSCAPE)
# define STM32_ILI9341_MADCTL_PARAM ILI9341_MADCTL_LANDSCAPE_PARAM1
# define STM32_ILI9341_MADCTL_PARAM ILI9341_MADCTL_LANDSCAPE_PARAM1
# warning "ILI9341 doesn't support full landscape with RGB interface"
#elif defined(CONFIG_STM32F429I_DISCO_ILI9341_FBIFACE_PORTRAIT)
# define STM32_ILI9341_MADCTL_PARAM ILI9341_MADCTL_PORTRAIT_PARAM1
# define STM32_ILI9341_MADCTL_PARAM ILI9341_MADCTL_PORTRAIT_PARAM1
#elif defined(CONFIG_STM32F429I_DISCO_ILI9341_FBIFACE_RLANDSCAPE)
# define STM32_ILI9341_MADCTL_PARAM ILI9341_MADCTL_RLANDSCAPE_PARAM1
# define STM32_ILI9341_MADCTL_PARAM ILI9341_MADCTL_RLANDSCAPE_PARAM1
# warning "ILI9341 doesn't support full landscape with RGB interface"
#elif defined(CONFIG_STM32F429I_DISCO_ILI9341_FBIFACE_RPORTRAIT)
# define STM32_ILI9341_MADCTL_PARAM ILI9341_MADCTL_RPORTRAIT_PARAM1
# define STM32_ILI9341_MADCTL_PARAM ILI9341_MADCTL_RPORTRAIT_PARAM1
#else
# error "display orientation not defined"
#endif
@@ -89,12 +89,12 @@ void weak_function stm32_spidev_initialize(void)
#if defined(CONFIG_LCD_UG2864AMBAG01) || defined(CONFIG_LCD_UG2864HSWEG01) || \
defined(CONFIG_LCD_SSD1351)
stm32_configgpio(GPIO_OLED_CS); /* OLED chip select */
# if defined(CONFIG_LCD_UG2864AMBAG01)
# if defined(CONFIG_LCD_UG2864AMBAG01)
stm32_configgpio(GPIO_OLED_A0); /* OLED Command/Data */
# endif
# if defined(CONFIG_LCD_UG2864HSWEG01) || defined(CONFIG_LCD_SSD1351)
# endif
# if defined(CONFIG_LCD_UG2864HSWEG01) || defined(CONFIG_LCD_SSD1351)
stm32_configgpio(GPIO_OLED_DC); /* OLED Command/Data */
# endif
# endif
#endif
}
@@ -316,12 +316,12 @@ int stm32_spi1cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd)
* registers."
*/
# if defined(CONFIG_LCD_UG2864AMBAG01)
# if defined(CONFIG_LCD_UG2864AMBAG01)
stm32_gpiowrite(GPIO_OLED_A0, !cmd);
# endif
# if defined(CONFIG_LCD_UG2864HSWEG01) || defined(CONFIG_LCD_SSD1351)
# endif
# if defined(CONFIG_LCD_UG2864HSWEG01) || defined(CONFIG_LCD_SSD1351)
stm32_gpiowrite(GPIO_OLED_DC, !cmd);
# endif
# endif
return OK;
}
#endif