Commit 5be87f1 1 parent 0e5cef3 commit 5be87f1 Copy full SHA for 5be87f1
File tree 1 file changed +3
-1
lines changed
src/rp2_common/hardware_dma/include/hardware
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -867,14 +867,16 @@ bool dma_timer_is_claimed(uint timer);
867
867
* \ingroup hardware_dma
868
868
*
869
869
* The timer will run at the system_clock_freq * numerator / denominator, so this is the speed
870
- * that data elements will be transferred at via a DMA channel using this timer as a DREQ
870
+ * that data elements will be transferred at via a DMA channel using this timer as a DREQ. The
871
+ * multiplier must be less than or equal to one.
871
872
*
872
873
* \param timer the dma timer
873
874
* \param numerator the fraction's numerator
874
875
* \param denominator the fraction's denominator
875
876
*/
876
877
static inline void dma_timer_set_fraction (uint timer , uint16_t numerator , uint16_t denominator ) {
877
878
check_dma_timer_param (timer );
879
+ invalid_params_if (DMA , numerator > denominator );
878
880
dma_hw -> timer [timer ] = (((uint32_t )numerator ) << DMA_TIMER0_X_LSB ) | (((uint32_t )denominator ) << DMA_TIMER0_Y_LSB );
879
881
}
880
882
You can’t perform that action at this time.
0 commit comments