Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pico-sdk
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Microcontroller
pico-sdk
Commits
5be87f1e
Unverified
Commit
5be87f1e
authored
1 year ago
by
Andrew Scheller
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Clarify that DMA timer fraction must be <= 1 (#1723)
parent
0e5cef3f
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/rp2_common/hardware_dma/include/hardware/dma.h
+3
-1
3 additions, 1 deletion
src/rp2_common/hardware_dma/include/hardware/dma.h
with
3 additions
and
1 deletion
src/rp2_common/hardware_dma/include/hardware/dma.h
+
3
−
1
View file @
5be87f1e
...
...
@@ -867,7 +867,8 @@ bool dma_timer_is_claimed(uint timer);
* \ingroup hardware_dma
*
* The timer will run at the system_clock_freq * numerator / denominator, so this is the speed
* that data elements will be transferred at via a DMA channel using this timer as a DREQ
* that data elements will be transferred at via a DMA channel using this timer as a DREQ. The
* multiplier must be less than or equal to one.
*
* \param timer the dma timer
* \param numerator the fraction's numerator
...
...
@@ -875,6 +876,7 @@ bool dma_timer_is_claimed(uint timer);
*/
static
inline
void
dma_timer_set_fraction
(
uint
timer
,
uint16_t
numerator
,
uint16_t
denominator
)
{
check_dma_timer_param
(
timer
);
invalid_params_if
(
DMA
,
numerator
>
denominator
);
dma_hw
->
timer
[
timer
]
=
(((
uint32_t
)
numerator
)
<<
DMA_TIMER0_X_LSB
)
|
(((
uint32_t
)
denominator
)
<<
DMA_TIMER0_Y_LSB
);
}
...
...
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