软件SPI可以驱动屏幕
This commit is contained in:
@@ -54,7 +54,7 @@ void MX_GPIO_Init(void)
|
||||
HAL_GPIO_WritePin(LED_GPIO_Port, LED_Pin, GPIO_PIN_SET);
|
||||
|
||||
/*Configure GPIO pin Output Level */
|
||||
HAL_GPIO_WritePin(GPIOB, LCD_RST_Pin|LCD_SCL_Pin|LCD_SDA_Pin, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(GPIOB, LCD_DC_Pin|LCD_CS_Pin|LCD_RST_Pin, GPIO_PIN_RESET);
|
||||
|
||||
/*Configure GPIO pin : LED_Pin */
|
||||
GPIO_InitStruct.Pin = LED_Pin;
|
||||
@@ -69,8 +69,8 @@ void MX_GPIO_Init(void)
|
||||
GPIO_InitStruct.Pull = GPIO_PULLDOWN;
|
||||
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
|
||||
|
||||
/*Configure GPIO pins : LCD_RST_Pin LCD_SCL_Pin LCD_SDA_Pin */
|
||||
GPIO_InitStruct.Pin = LCD_RST_Pin|LCD_SCL_Pin|LCD_SDA_Pin;
|
||||
/*Configure GPIO pins : LCD_DC_Pin LCD_CS_Pin LCD_RST_Pin */
|
||||
GPIO_InitStruct.Pin = LCD_DC_Pin|LCD_CS_Pin|LCD_RST_Pin;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
|
||||
|
||||
Reference in New Issue
Block a user