diff --git a/bsp/tkm32F499/drivers/board.c b/bsp/tkm32F499/drivers/board.c index b11afa8f16..6e5eb5791d 100644 --- a/bsp/tkm32F499/drivers/board.c +++ b/bsp/tkm32F499/drivers/board.c @@ -26,8 +26,8 @@ MSH_CMD_EXPORT(reboot, Reboot System); static void bsp_clock_config(void) { RemapVtorTable(); - SystemClk_HSEInit(RCC_PLLMul_20);//启动PLL时钟,12MHz*20=240MHz - NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);//2:2,全局性函数,仅需设置一次 + SystemClk_HSEInit(RCC_PLLMul_20);//启动PLL时钟,12MHz*20=240MHz + NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);//2:2,全局性函数,仅需设置一次 uint32_t sysclk = 0; getSystemClock(&sysclk); diff --git a/bsp/tkm32F499/drivers/drv_gpio.h b/bsp/tkm32F499/drivers/drv_gpio.h index 50eac81e17..1f52cacba5 100644 --- a/bsp/tkm32F499/drivers/drv_gpio.h +++ b/bsp/tkm32F499/drivers/drv_gpio.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * diff --git a/bsp/tkm32F499/drivers/lcd/lcd.c b/bsp/tkm32F499/drivers/lcd/lcd.c index e0bbb22521..abfd677c9d 100644 --- a/bsp/tkm32F499/drivers/lcd/lcd.c +++ b/bsp/tkm32F499/drivers/lcd/lcd.c @@ -187,7 +187,7 @@ void BlockWrite(unsigned int Xstart, unsigned int Xend, unsigned int Ystart, uns SPI_WriteData(Yend & 0xff); SPI_WriteComm(0x2c00); - // for(Xstart=0;Xstart<1000;Xstart++)SPI_WriteData(0x55); + // for(Xstart=0;Xstart<1000;Xstart++)SPI_WriteData(0x55); } void Lcd_Initialize(void) { @@ -1040,23 +1040,23 @@ void LCD_Initial(rt_uint32_t LTDC_Buf1, rt_uint32_t LTDC_Buf2) //LCD初始化函 // LTDC_Buf[yStart + i + YSIZE_PHYS * j + temp] = Color; // } -// // rt_uint16_t i,j; -// // rt_uint32_t temp; -// // temp = XSIZE_PHYS*yStart; -// // for(i=0;iBSRR = GPIO_Pin_11; \ - else \ - GPIOB->BRR = GPIO_Pin_11; -#define SPI_DCLK(a) \ - if (a) \ - GPIOB->BSRR = GPIO_Pin_9; \ - else \ - GPIOB->BRR = GPIO_Pin_9; -#define SPI_SDA(a) \ - if (a) \ - GPIOB->BSRR = GPIO_Pin_0; \ - else \ - GPIOB->BRR = GPIO_Pin_0; +#define LCD_SPI_CS(a) \ + if (a) \ + GPIOB->BSRR = GPIO_Pin_11; \ + else \ + GPIOB->BRR = GPIO_Pin_11; +#define SPI_DCLK(a) \ + if (a) \ + GPIOB->BSRR = GPIO_Pin_9; \ + else \ + GPIOB->BRR = GPIO_Pin_9; +#define SPI_SDA(a) \ + if (a) \ + GPIOB->BSRR = GPIO_Pin_0; \ + else \ + GPIOB->BRR = GPIO_Pin_0; -#define LCD_RST(a) \ - if (a) \ - GPIOD->BSRR = GPIO_Pin_6; \ - else \ - GPIOD->BRR = GPIO_Pin_6; +#define LCD_RST(a) \ + if (a) \ + GPIOD->BSRR = GPIO_Pin_6; \ + else \ + GPIOD->BRR = GPIO_Pin_6; #define Set_Rst GPIOD->BSRR = GPIO_Pin_6 #define Clr_Rst GPIOD->BRR = GPIO_Pin_6 #define Lcd_Light_ON GPIOD->BSRR = GPIO_Pin_8 //PD8为高电平 背光打开