From 681df8b2915bff71da4f6b43a10a23be782fde19 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Fri, 5 Oct 2012 19:32:22 +0200 Subject: [PATCH] Renamed DA0/DA1 to DAC0/DAC1 (part 2...) --- hardware/arduino/sam/cores/arduino/Arduino.h | 4 ++-- hardware/arduino/sam/cores/arduino/wiring_analog.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hardware/arduino/sam/cores/arduino/Arduino.h b/hardware/arduino/sam/cores/arduino/Arduino.h index 0678b1e5d..4b94acf18 100644 --- a/hardware/arduino/sam/cores/arduino/Arduino.h +++ b/hardware/arduino/sam/cores/arduino/Arduino.h @@ -108,8 +108,8 @@ typedef enum _EAnalogChannel ADC13, ADC14, ADC15, - DAC0, - DAC1 + DA0, + DA1 } EAnalogChannel ; #define ADC_CHANNEL_NUMBER_NONE 0xffffffff diff --git a/hardware/arduino/sam/cores/arduino/wiring_analog.c b/hardware/arduino/sam/cores/arduino/wiring_analog.c index 644921499..22e575b09 100644 --- a/hardware/arduino/sam/cores/arduino/wiring_analog.c +++ b/hardware/arduino/sam/cores/arduino/wiring_analog.c @@ -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);