回退 V2 引脚补丁:v2-on-ui 沿用 v2 硬件引脚(LED2=PB0 驱动致板级电源/复位跌落,开机死亡)
This commit is contained in:
@@ -179,19 +179,19 @@ void HAL_SPI_MspInit(SPI_HandleTypeDef* spiHandle)
|
||||
PB14 ------> SPI2_MISO
|
||||
PB15 ------> SPI2_MOSI
|
||||
*/
|
||||
GPIO_InitStruct.Pin = CH395F_SCK_Pin|CH395F_SDO_Pin;
|
||||
GPIO_InitStruct.Pin = CH395F_SCK_Pin|CH395F_SDOB15_Pin;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
||||
GPIO_InitStruct.Alternate = GPIO_AF5_SPI2;
|
||||
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
||||
|
||||
GPIO_InitStruct.Pin = CH395F_SDI_Pin;
|
||||
GPIO_InitStruct.Pin = CH395F_SDO_Pin;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
||||
GPIO_InitStruct.Alternate = GPIO_AF5_SPI2;
|
||||
HAL_GPIO_Init(CH395F_SDI_GPIO_Port, &GPIO_InitStruct);
|
||||
HAL_GPIO_Init(CH395F_SDO_GPIO_Port, &GPIO_InitStruct);
|
||||
|
||||
/* SPI2 DMA Init */
|
||||
/* SPI2_RX Init */
|
||||
@@ -280,7 +280,7 @@ void HAL_SPI_MspDeInit(SPI_HandleTypeDef* spiHandle)
|
||||
PB14 ------> SPI2_MISO
|
||||
PB15 ------> SPI2_MOSI
|
||||
*/
|
||||
HAL_GPIO_DeInit(GPIOB, CH395F_SCK_Pin|CH395F_SDI_Pin|CH395F_SDO_Pin);
|
||||
HAL_GPIO_DeInit(GPIOB, CH395F_SCK_Pin|CH395F_SDO_Pin|CH395F_SDOB15_Pin);
|
||||
|
||||
/* SPI2 DMA DeInit */
|
||||
HAL_DMA_DeInit(spiHandle->hdmarx);
|
||||
|
||||
Reference in New Issue
Block a user