Skip to content

Commit a594bc3

Browse files
committed
removed TEMP read from analog API
1 parent e7d9d28 commit a594bc3

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

cores/arduino/wiring_analog.c

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -128,21 +128,10 @@ uint32_t analogRead( uint32_t ulPin )
128128
while ( DAC->STATUS.bit.SYNCBUSY == 1 );
129129
}
130130

131-
if (ulPin != TEMP)
132-
{
133-
pinPeripheral(ulPin, g_APinDescription[ulPin].ulPinType);
134-
135-
while ( ADC->STATUS.bit.SYNCBUSY == 1 );
136-
ADC->INPUTCTRL.bit.MUXPOS = g_APinDescription[ulPin].ulADCChannelNumber; // Selection for the positive ADC input
137-
}
138-
else
139-
{
140-
while ( ADC->STATUS.bit.SYNCBUSY == 1 );
141-
ADC->INPUTCTRL.bit.MUXPOS = ulPin & 0x7F; // Selection for the positive ADC input
142-
//ADC->INPUTCTRL.bit.MUXPOS = 0x18; // Selection for the positive ADC input
131+
pinPeripheral(ulPin, g_APinDescription[ulPin].ulPinType);
143132

144-
SYSCTRL->VREF.bit.TSEN = 0x1; // Temperature sensor is enabled and routed to an ADC input channel.
145-
}
133+
while ( ADC->STATUS.bit.SYNCBUSY == 1 );
134+
ADC->INPUTCTRL.bit.MUXPOS = g_APinDescription[ulPin].ulADCChannelNumber; // Selection for the positive ADC input
146135

147136
// Control A
148137
/*

variants/arduino_zero/variant.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ static const uint8_t A2 = PIN_A2 ;
9292
static const uint8_t A3 = PIN_A3 ;
9393
static const uint8_t A4 = PIN_A4 ;
9494
static const uint8_t A5 = PIN_A5 ;
95-
static const uint8_t TEMP = 0x98 ;
9695
#define ADC_RESOLUTION 12
9796

9897
/*

0 commit comments

Comments
 (0)