__weak voidHAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) { /* Prevent unused argument(s) compilation warning */ UNUSED(GPIO_Pin); /* NOTE: This function Should not be modified, when the callback is needed, the HAL_GPIO_EXTI_Callback could be implemented in the user file */ }
/* Private function prototypes -----------------------------------------------*/ voidSystemClock_Config(void); staticvoidMX_GPIO_Init(void); /* USER CODE BEGIN PFP */
/* USER CODE END PFP */
/* Private user code ---------------------------------------------------------*/ /* USER CODE BEGIN 0 */
/* USER CODE END 0 */
/** * @brief The application entry point. * @retval int */ intmain(void) { /* USER CODE BEGIN 1 */
/* USER CODE BEGIN 4 */ voidHAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin){ if(GPIO_Pin == Button_Pin){ HAL_Delay(500); HAL_GPIO_TogglePin(LD_RED_GPIO_Port,LD_RED_Pin); HAL_Delay(100); HAL_GPIO_TogglePin(LD_GREEN_GPIO_Port,LD_GREEN_Pin); HAL_Delay(100); HAL_GPIO_TogglePin(LD1_GPIO_Port,LD1_Pin); HAL_Delay(100); HAL_GPIO_TogglePin(LD2_GPIO_Port,LD2_Pin); HAL_Delay(100); HAL_GPIO_TogglePin(LD3_GPIO_Port,LD3_Pin); HAL_Delay(100); HAL_GPIO_TogglePin(LD4_GPIO_Port,LD4_Pin); HAL_Delay(100); HAL_GPIO_TogglePin(LD5_GPIO_Port,LD5_Pin); HAL_Delay(100); HAL_GPIO_TogglePin(LD6_GPIO_Port,LD6_Pin); HAL_Delay(100); HAL_GPIO_TogglePin(LD7_GPIO_Port,LD7_Pin); HAL_Delay(100); HAL_GPIO_TogglePin(LD8_GPIO_Port,LD8_Pin); } } /* USER CODE END 4 */
/** * @brief This function is executed in case of error occurrence. * @retval None */ voidError_Handler(void) { /* USER CODE BEGIN Error_Handler_Debug */ /* User can add his own implementation to report the HAL error return state */
/* USER CODE END Error_Handler_Debug */ }
#ifdef USE_FULL_ASSERT /** * @brief Reports the name of the source file and the source line number * where the assert_param error has occurred. * @param file: pointer to the source file name * @param line: assert_param error line source number * @retval None */ voidassert_failed(uint8_t *file, uint32_t line) { /* USER CODE BEGIN 6 */ /* User can add his own implementation to report the file name and line number, tex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ /* USER CODE END 6 */ } #endif/* USE_FULL_ASSERT */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/