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
806c3303
Commit
806c3303
authored
9 years ago
by
Claudio Indellicati
Committed by
Cristian Maglie
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fixed register synchronization in 'analogReadResolution()'.
parent
3912d9d8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cores/arduino/wiring_analog.c
+2
-2
2 additions, 2 deletions
cores/arduino/wiring_analog.c
with
2 additions
and
2 deletions
cores/arduino/wiring_analog.c
+
2
−
2
View file @
806c3303
/*
Copyright (c) 2014 Arduino. All right reserved.
Copyright (c) 2014 Arduino
LLC
. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
...
...
@@ -57,7 +57,6 @@ static void syncTCC(Tcc* TCCx) {
void
analogReadResolution
(
int
res
)
{
_readResolution
=
res
;
syncADC
();
if
(
res
>
10
)
{
ADC
->
CTRLB
.
bit
.
RESSEL
=
ADC_CTRLB_RESSEL_12BIT_Val
;
...
...
@@ -73,6 +72,7 @@ void analogReadResolution( int res )
ADC
->
CTRLB
.
bit
.
RESSEL
=
ADC_CTRLB_RESSEL_8BIT_Val
;
_ADCResolution
=
8
;
}
syncADC
();
}
void
analogWriteResolution
(
int
res
)
...
...
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