Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Arduino Core for SAMD21 CPU
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
josc941e
Arduino Core for SAMD21 CPU
Commits
a594bc32
Commit
a594bc32
authored
10 years ago
by
Cristian Maglie
Committed by
Cristian Maglie
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
removed TEMP read from analog API
parent
e7d9d285
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cores/arduino/wiring_analog.c
+3
-14
3 additions, 14 deletions
cores/arduino/wiring_analog.c
variants/arduino_zero/variant.h
+0
-1
0 additions, 1 deletion
variants/arduino_zero/variant.h
with
3 additions
and
15 deletions
cores/arduino/wiring_analog.c
+
3
−
14
View file @
a594bc32
...
...
@@ -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
/*
...
...
This diff is collapsed.
Click to expand it.
variants/arduino_zero/variant.h
+
0
−
1
View file @
a594bc32
...
...
@@ -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
/*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment