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

Renamed DA0/DA1 to DAC0/DAC1 (part 2...)

This commit is contained in:
Cristian Maglie 2012-10-05 19:32:22 +02:00
parent 27d231b2cf
commit 681df8b291
2 changed files with 4 additions and 4 deletions

View File

@ -108,8 +108,8 @@ typedef enum _EAnalogChannel
ADC13,
ADC14,
ADC15,
DAC0,
DAC1
DA0,
DA1
} EAnalogChannel ;
#define ADC_CHANNEL_NUMBER_NONE 0xffffffff

View File

@ -204,8 +204,8 @@ void analogWrite(uint32_t ulPin, uint32_t ulValue) {
if ((attr & PIN_ATTR_ANALOG) == PIN_ATTR_ANALOG) {
EAnalogChannel channel = g_APinDescription[ulPin].ulADCChannelNumber;
if (channel == DAC0 || channel == DAC1) {
uint32_t chDACC = ((channel == DAC0) ? 0 : 1);
if (channel == DA0 || channel == DA1) {
uint32_t chDACC = ((channel == DA0) ? 0 : 1);
if ((dacc_get_channel_status(DACC_INTERFACE) & (1 << chDACC)) == 0) {
/* Enable clock for DACC_INTERFACE */
pmc_enable_periph_clk(DACC_INTERFACE_ID);