Compare commits
	
		
			1 Commits
		
	
	
		
			8ad28e5e39
			...
			master
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 2f20ebeba4 | 
							
								
								
									
										7
									
								
								main.c
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								main.c
									
									
									
									
									
								
							| @@ -51,7 +51,8 @@ void EXTI2_IRQHandler(void) | ||||
| void HAL_GPIO_EXTI_Callback(uint16_t GPIO_PIN) | ||||
| { | ||||
| 	//button interrupt | ||||
| 	HAL_GPIO_TogglePin(GPIOF, GPIO_PIN_9); | ||||
| 	HAL_GPIO_WritePin(GPIOF, GPIO_PIN_9, 1); | ||||
| 	osEventFlagsSet(evt_id, 0x1U); | ||||
| } | ||||
|   | ||||
|  | ||||
| @@ -62,8 +63,8 @@ __NO_RETURN static void taskCounter(void *argument) { | ||||
|  | ||||
| 	 | ||||
| 	for (;;) { | ||||
| 		osEventFlagsWait(evt_id); | ||||
| 		osEventFlagsClear(evt_id, ); | ||||
| 		osEventFlagsWait(evt_id, 0x1U, osFlagsWaitAny, osWaitForever); | ||||
| 		HAL_GPIO_WritePin(GPIOF, GPIO_PIN_9, 0); | ||||
| 	} | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user