Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
b03df60f
Commit
b03df60f
authored
Jun 29, 2016
by
dpslwk
Committed by
Damien George
Jun 29, 2016
Browse files
stmhal: Correct DMA to allow SD card on L4 MCUs.
parent
14b7c3e5
Changes
2
Hide whitespace changes
Inline
Side-by-side
stmhal/dma.c
View file @
b03df60f
...
...
@@ -267,8 +267,10 @@ const dma_descr_t dma_ADC_2_RX = { DMA2_Channel4, DMA_REQUEST_0, DMA_PERIPH_TO_M
const dma_descr_t dma_DAC_1_TX = { DMA2_Channel4, DMA_REQUEST_3, DMA_MEMORY_TO_PERIPH, dma_id_10, &dma_init_struct_dac };
const dma_descr_t dma_SPI_1_TX = { DMA2_Channel4, DMA_REQUEST_4, DMA_MEMORY_TO_PERIPH, dma_id_10, &dma_init_struct_spi_i2c };
*/
#if MICROPY_HW_HAS_SDCARD
#if defined(MICROPY_HW_HAS_SDCARD) && MICROPY_HW_HAS_SDCARD
// defined twice as L4 HAL only needs one channel and can correctly switch direction but sdcard.c needs two channels
const
dma_descr_t
dma_SDIO_0_TX
=
{
DMA2_Channel4
,
DMA_REQUEST_7
,
DMA_MEMORY_TO_PERIPH
,
dma_id_10
,
&
dma_init_struct_sdio
};
const
dma_descr_t
dma_SDIO_0_RX
=
{
DMA2_Channel4
,
DMA_REQUEST_7
,
DMA_PERIPH_TO_MEMORY
,
dma_id_10
,
&
dma_init_struct_sdio
};
#endif
/* not preferred streams
const dma_descr_t dma_ADC_3_RX = { DMA2_Channel5, DMA_REQUEST_0, DMA_PERIPH_TO_MEMORY, dma_id_11, NULL };
...
...
stmhal/dma.h
View file @
b03df60f
...
...
@@ -73,7 +73,8 @@ extern const dma_descr_t dma_I2C_1_TX;
extern
const
dma_descr_t
dma_I2C_1_RX
;
extern
const
dma_descr_t
dma_SPI_3_RX
;
extern
const
dma_descr_t
dma_SPI_3_TX
;
extern
const
dma_descr_t
dma_SDIO_1_TX
;
extern
const
dma_descr_t
dma_SDIO_0_TX
;
extern
const
dma_descr_t
dma_SDIO_0_RX
;
#endif
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment