Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

modified analogWrite to wait for end of conversion #1202

Merged
merged 1 commit into from

2 participants

@vdorr

fix for Due analogWrite failing to set one DAC output when called in quick succession for both outputs

@cmaglie cmaglie merged commit 2007a62 into arduino:lib-1.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 6, 2013
  1. @vdorr
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  hardware/arduino/sam/cores/arduino/wiring_analog.c
View
2  hardware/arduino/sam/cores/arduino/wiring_analog.c
@@ -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;
}
}
Something went wrong with that request. Please try again.