DMA full and half complete callbacks work!
This commit is contained in:
@ -96,7 +96,8 @@ int main(void)
|
||||
MX_ADC1_Init();
|
||||
MX_USB_DEVICE_Init();
|
||||
/* USER CODE BEGIN 2 */
|
||||
//HAL_ADC_Start_DMA(&hadc1, (uint32_t*)ADC1_buff_circular, ADC_BUFF_SIZE);
|
||||
HAL_GPIO_WritePin(LED_BLUE_GPIO_Port, LED_BLUE_Pin, GPIO_PIN_SET);
|
||||
HAL_ADC_Start_DMA(&hadc1, (uint32_t*)ADC1_buff_circular, ADC_BUFF_SIZE);
|
||||
/* USER CODE END 2 */
|
||||
|
||||
/* Infinite loop */
|
||||
|
||||
@ -228,14 +228,14 @@ void OTG_FS_IRQHandler(void)
|
||||
}
|
||||
|
||||
/* USER CODE BEGIN 1 */
|
||||
/*
|
||||
|
||||
void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc)
|
||||
{
|
||||
HAL_GPIO_WritePin(LED_BLUE_GPIO_Port, LED_BLUE_Pin, GPIO_PIN_SET);
|
||||
// This function is called when the first half of the ADC buffer is filled
|
||||
// You can process the first half of ADC1_buff_circular here
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
void HAL_ADC_ConvHalfCpltCallback(ADC_HandleTypeDef* hadc)
|
||||
|
||||
Reference in New Issue
Block a user