Skip to content

Commit 6902d0e

Browse files
author
Owen L - SFE
committed
get interrupt status before clearing interrupts in analogRead
Addresses #130
1 parent d757bcc commit 6902d0e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cores/arduino/ard_sup/analog/ap3_analog.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ uint16_t analogRead(uint8_t pinNumber)
175175
ap3_change_channel(padNumber); //Point ADC channel at this pad
176176

177177
// Clear the ADC interrupt.
178+
am_hal_adc_interrupt_status(g_ADCHandle, &ui32IntMask, true);
178179
if (AM_HAL_STATUS_SUCCESS != am_hal_adc_interrupt_clear(g_ADCHandle, ui32IntMask))
179180
{
180181
//Serial.println("Error clearing ADC interrupt status");

0 commit comments

Comments
 (0)