修改SPI transmit等待时间

This commit is contained in:
不吃油炸鸡
2026-03-25 15:57:26 +08:00
parent 4cd3ac4903
commit baf4fee442

View File

@@ -40,7 +40,7 @@ void LCD_GPIO_Init(void)
void LCD_Writ_Bus(u8 dat) void LCD_Writ_Bus(u8 dat)
{ {
//hard SPI //hard SPI
HAL_SPI_Transmit(&hspi2,&dat,1,1); HAL_SPI_Transmit(&hspi2, &dat, 1, 100);
//soft SPI //soft SPI
/* /*
@@ -84,9 +84,9 @@ void LCD_WR_DATA(u16 dat)
// LCD_Writ_Bus(dat>>8); // LCD_Writ_Bus(dat>>8);
// LCD_Writ_Bus(dat); // LCD_Writ_Bus(dat);
uint8_t temp[2]; uint8_t temp[2];
temp[0]=(dat>>8)&0xff; temp[0] = (dat>>8)&0xff;
temp[1]=dat&0xff; temp[1] = dat&0xff;
HAL_SPI_Transmit(&hspi2,temp,2,1); HAL_SPI_Transmit(&hspi2, temp, 2, 100);
} }