1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-11-30 11:24:12 +01:00

Merge pull request #1202 from vdorr/lib-1.5

modified analogWrite to wait for end of conversion
This commit is contained in:
Cristian Maglie 2013-01-06 08:42:00 -08:00
commit 2007a626dd

View File

@ -243,8 +243,8 @@ void analogWrite(uint32_t ulPin, uint32_t ulValue) {
// Write user value
ulValue = mapResolution(ulValue, _writeResolution, DACC_RESOLUTION);
while ((dacc_get_interrupt_status(DACC_INTERFACE) & DACC_ISR_TXRDY) == 0);
dacc_write_conversion_data(DACC_INTERFACE, ulValue);
while ((dacc_get_interrupt_status(DACC_INTERFACE) & DACC_ISR_EOC) == 0);
return;
}
}