Skip to content
Snippets Groups Projects
Commit a594bc32 authored by Cristian Maglie's avatar Cristian Maglie Committed by Cristian Maglie
Browse files

removed TEMP read from analog API

parent e7d9d285
No related branches found
No related tags found
No related merge requests found
......@@ -128,21 +128,10 @@ uint32_t analogRead( uint32_t ulPin )
while ( DAC->STATUS.bit.SYNCBUSY == 1 );
}
if (ulPin != TEMP)
{
pinPeripheral(ulPin, g_APinDescription[ulPin].ulPinType);
while ( ADC->STATUS.bit.SYNCBUSY == 1 );
ADC->INPUTCTRL.bit.MUXPOS = g_APinDescription[ulPin].ulADCChannelNumber; // Selection for the positive ADC input
}
else
{
while ( ADC->STATUS.bit.SYNCBUSY == 1 );
ADC->INPUTCTRL.bit.MUXPOS = ulPin & 0x7F; // Selection for the positive ADC input
//ADC->INPUTCTRL.bit.MUXPOS = 0x18; // Selection for the positive ADC input
pinPeripheral(ulPin, g_APinDescription[ulPin].ulPinType);
SYSCTRL->VREF.bit.TSEN = 0x1; // Temperature sensor is enabled and routed to an ADC input channel.
}
while ( ADC->STATUS.bit.SYNCBUSY == 1 );
ADC->INPUTCTRL.bit.MUXPOS = g_APinDescription[ulPin].ulADCChannelNumber; // Selection for the positive ADC input
// Control A
/*
......
......@@ -92,7 +92,6 @@ static const uint8_t A2 = PIN_A2 ;
static const uint8_t A3 = PIN_A3 ;
static const uint8_t A4 = PIN_A4 ;
static const uint8_t A5 = PIN_A5 ;
static const uint8_t TEMP = 0x98 ;
#define ADC_RESOLUTION 12
/*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment