display adc measure with provided app
This commit is contained in:
		| @@ -8,6 +8,10 @@ | ||||
| #include "stm32f7xx_hal.h" | ||||
| #include "main.h" | ||||
| #include "board/buttonscontroller.h" | ||||
| #include "app/factory.h" | ||||
|  | ||||
| uint16_t adcValuesBuffer[ADC_VALUES_BUFFER_SIZE]; | ||||
| int ADCBufferIndex = 0; | ||||
|  | ||||
|  | ||||
| extern "C" void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) | ||||
| @@ -26,8 +30,10 @@ extern "C" void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) | ||||
| } | ||||
|  | ||||
| extern "C" void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef * hadc) { | ||||
| 	HAL_GPIO_TogglePin(OUT1_GPIO_Port, OUT1_Pin); | ||||
| 	volatile uint32_t value = HAL_ADC_GetValue(hadc); | ||||
| 	//HAL_GPIO_TogglePin(OUT1_GPIO_Port, OUT1_Pin); | ||||
| 	adcValuesBuffer[ADCBufferIndex] = HAL_ADC_GetValue(hadc); | ||||
| 	ADCBufferIndex++; | ||||
| 	if(ADCBufferIndex == ADC_VALUES_BUFFER_SIZE) ADCBufferIndex = 0; | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user