add button test at the board startup, part 2
This commit is contained in:
+3
-4
@@ -53,7 +53,7 @@ void ((*executors[])(void)) = {
|
||||
external_temp_show_fahrenheit
|
||||
};
|
||||
|
||||
int current_executor_id = 0;
|
||||
size_t current_executor_id = 0;
|
||||
|
||||
/* USER CODE END PV */
|
||||
|
||||
@@ -174,14 +174,13 @@ int main(void)
|
||||
HAL_NVIC_EnableIRQ(EXTI0_IRQn);
|
||||
|
||||
// switch mode for SW5 (alternative advancing method)
|
||||
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_8;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
|
||||
|
||||
HAL_NVIC_SetPriority(EXTI8_IRQn, 0, 0);
|
||||
HAL_NVIC_EnableIRQ(EXTI8_IRQn);
|
||||
HAL_NVIC_SetPriority(EXTI9_5_IRQn, 0, 0);
|
||||
HAL_NVIC_EnableIRQ(EXTI9_5_IRQn);
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user