Register SDCard DMA in resource list
This commit is contained in:
parent
ea2c8a6fde
commit
377893e173
|
@ -41,7 +41,9 @@ const char * const ownerNames[OWNER_TOTAL_COUNT] = {
|
|||
"SPI_MOSI",
|
||||
"I2C_SCL",
|
||||
"I2C_SDA",
|
||||
"SDCARD",
|
||||
"SDCARD_CS",
|
||||
"SDCARD_DETECT",
|
||||
"FLASH_CS",
|
||||
"BARO_CS",
|
||||
"MPU_CS",
|
||||
|
@ -54,7 +56,6 @@ const char * const ownerNames[OWNER_TOTAL_COUNT] = {
|
|||
"USB_DETECT",
|
||||
"BEEPER",
|
||||
"OSD",
|
||||
"SDCARD_DETECT",
|
||||
"RX_BIND",
|
||||
"INVERTER",
|
||||
"LED_STRIP",
|
||||
|
|
|
@ -41,7 +41,9 @@ typedef enum {
|
|||
OWNER_SPI_MOSI,
|
||||
OWNER_I2C_SCL,
|
||||
OWNER_I2C_SDA,
|
||||
OWNER_SDCARD,
|
||||
OWNER_SDCARD_CS,
|
||||
OWNER_SDCARD_DETECT,
|
||||
OWNER_FLASH_CS,
|
||||
OWNER_BARO_CS,
|
||||
OWNER_MPU_CS,
|
||||
|
@ -54,7 +56,6 @@ typedef enum {
|
|||
OWNER_USB_DETECT,
|
||||
OWNER_BEEPER,
|
||||
OWNER_OSD,
|
||||
OWNER_SDCARD_DETECT,
|
||||
OWNER_RX_BIND,
|
||||
OWNER_INVERTER,
|
||||
OWNER_LED_STRIP,
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
#include "nvic.h"
|
||||
#include "io.h"
|
||||
#include "dma.h"
|
||||
|
||||
#include "bus_spi.h"
|
||||
#include "system.h"
|
||||
|
@ -551,6 +552,9 @@ void sdcard_init(bool useDMA)
|
|||
{
|
||||
#ifdef SDCARD_DMA_CHANNEL_TX
|
||||
useDMAForTx = useDMA;
|
||||
if (useDMAForTx) {
|
||||
dmaInit(dmaGetIdentifier(SDCARD_DMA_CHANNEL_TX), OWNER_SDCARD, 0);
|
||||
}
|
||||
#else
|
||||
// DMA is not available
|
||||
(void) useDMA;
|
||||
|
|
Loading…
Reference in New Issue