-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add test for GPIO #400
Open
cnlohr
wants to merge
14
commits into
master
Choose a base branch
from
gpio-test-example
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add test for GPIO #400
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prosper00
reviewed
Sep 24, 2024
examples/gpio_test/gpio_test.c
Outdated
ADC1->ISQR = ((0)<<0) | ((1)<<5) | ((2)<<10) | ((3)<<15) | (3<<20); | ||
|
||
// 0:7 => 3/9/15/30/43/57/73/241 cycles | ||
ADC1->SAMPTR2 |= (7<<(3*0)) | (7<<(3*1)) | (7<<(3*2)) | (7<<(3*3)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about using the defines for setting these bits? More verbose, but also a bit more clear and corresponds to the RM nomenclature. For an example, I think this is a bit clearer
ADC1->ISQR=(ADC_JL_0 | ADC_JL_1 | ADC_JSQ4_1 | ADC_JSQ4_0 | ADC_JSQ3_1 | ADC_JSQ2_0);
ADC1->SAMPTR2 |= (ADC_SMP0_0 | ADC_SMP0_1 | ADC_SMP0_2 | \
ADC_SMP1_0 | ADC_SMP1_1 | ADC_SMP1_2 | \
ADC_SMP2_0 | ADC_SMP2_1 | ADC_SMP2_2 | \
ADC_SMP3_1 | ADC_SMP3_1 | ADC_SMP3_2);
Thanks, I've taken that into account, and updated it. |
cnlohr
force-pushed
the
gpio-test-example
branch
from
September 27, 2024 22:58
f124043
to
1061595
Compare
…ove documentation about GPIO/examples
Update GPIO Test
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(To test input/output electrical properties)