Register SDCard DMA in resource list

This commit is contained in:
Michael Jakob 2017-02-02 21:17:45 +01:00 committed by borisbstyle
parent ea2c8a6fde
commit 377893e173
3 changed files with 8 additions and 2 deletions

View File

@ -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",

View File

@ -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,

View File

@ -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;