File tree Expand file tree Collapse file tree 2 files changed +3
-15
lines changed Expand file tree Collapse file tree 2 files changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -128,21 +128,10 @@ uint32_t analogRead( uint32_t ulPin )
128
128
while ( DAC -> STATUS .bit .SYNCBUSY == 1 );
129
129
}
130
130
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 );
143
132
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
146
135
147
136
// Control A
148
137
/*
Original file line number Diff line number Diff line change @@ -92,7 +92,6 @@ static const uint8_t A2 = PIN_A2 ;
92
92
static const uint8_t A3 = PIN_A3 ;
93
93
static const uint8_t A4 = PIN_A4 ;
94
94
static const uint8_t A5 = PIN_A5 ;
95
- static const uint8_t TEMP = 0x98 ;
96
95
#define ADC_RESOLUTION 12
97
96
98
97
/*
You can’t perform that action at this time.
0 commit comments