try GPIO_MODE_IT_RISING_FALLING instread of Falling only

This commit is contained in:
Yunhorn 2024-02-22 11:27:16 +08:00
parent 0c0dc4f5f0
commit 70f63ddc2d
1 changed files with 1 additions and 1 deletions

View File

@ -89,7 +89,7 @@ void MX_GPIO_Init(void)
/*Configure GPIO pin : PtPin */
GPIO_InitStruct.Pin = BUT1_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING;
GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING_FALLING;
GPIO_InitStruct.Pull = GPIO_PULLUP;
HAL_GPIO_Init(BUT1_GPIO_Port, &GPIO_InitStruct);