diff options
| author | Damien George <damien@micropython.org> | 2025-04-28 12:51:51 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2025-05-09 12:05:04 +1000 |
| commit | 9c8c219f8af4128822dc525cc7d934533bd4675a (patch) | |
| tree | 55aa2faeee88c50085d3a0074478c68612c966f7 | |
| parent | 928466d74c10c09570e63030419804889f8e0e98 (diff) | |
rp2/rp2_dma: Fix default value used in pack_ctrl on RP2350.
The bit position of CHAIN_TO is not the same as on RP2040.
Signed-off-by: Damien George <damien@micropython.org>
| -rw-r--r-- | ports/rp2/rp2_dma.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ports/rp2/rp2_dma.c b/ports/rp2/rp2_dma.c index 78f69e645..94c61e226 100644 --- a/ports/rp2/rp2_dma.c +++ b/ports/rp2/rp2_dma.c @@ -315,7 +315,7 @@ static mp_obj_t rp2_dma_pack_ctrl(size_t n_pos_args, const mp_obj_t *pos_args, m // Pack keyword settings into a control register value, using either the default for this // DMA channel or the provided defaults rp2_dma_obj_t *self = MP_OBJ_TO_PTR(pos_args[0]); - mp_uint_t value = DEFAULT_DMA_CONFIG | ((self->channel & 0xf) << 11); + mp_uint_t value = DEFAULT_DMA_CONFIG | ((self->channel & 0xf) << DMA_CH0_CTRL_TRIG_CHAIN_TO_LSB); if (n_pos_args > 1) { mp_raise_TypeError(MP_ERROR_TEXT("pack_ctrl only takes keyword arguments")); |
