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", "SPI_MOSI",
"I2C_SCL", "I2C_SCL",
"I2C_SDA", "I2C_SDA",
"SDCARD",
"SDCARD_CS", "SDCARD_CS",
"SDCARD_DETECT",
"FLASH_CS", "FLASH_CS",
"BARO_CS", "BARO_CS",
"MPU_CS", "MPU_CS",
@ -54,7 +56,6 @@ const char * const ownerNames[OWNER_TOTAL_COUNT] = {
"USB_DETECT", "USB_DETECT",
"BEEPER", "BEEPER",
"OSD", "OSD",
"SDCARD_DETECT",
"RX_BIND", "RX_BIND",
"INVERTER", "INVERTER",
"LED_STRIP", "LED_STRIP",

View File

@ -41,7 +41,9 @@ typedef enum {
OWNER_SPI_MOSI, OWNER_SPI_MOSI,
OWNER_I2C_SCL, OWNER_I2C_SCL,
OWNER_I2C_SDA, OWNER_I2C_SDA,
OWNER_SDCARD,
OWNER_SDCARD_CS, OWNER_SDCARD_CS,
OWNER_SDCARD_DETECT,
OWNER_FLASH_CS, OWNER_FLASH_CS,
OWNER_BARO_CS, OWNER_BARO_CS,
OWNER_MPU_CS, OWNER_MPU_CS,
@ -54,7 +56,6 @@ typedef enum {
OWNER_USB_DETECT, OWNER_USB_DETECT,
OWNER_BEEPER, OWNER_BEEPER,
OWNER_OSD, OWNER_OSD,
OWNER_SDCARD_DETECT,
OWNER_RX_BIND, OWNER_RX_BIND,
OWNER_INVERTER, OWNER_INVERTER,
OWNER_LED_STRIP, OWNER_LED_STRIP,

View File

@ -24,6 +24,7 @@
#include "nvic.h" #include "nvic.h"
#include "io.h" #include "io.h"
#include "dma.h"
#include "bus_spi.h" #include "bus_spi.h"
#include "system.h" #include "system.h"
@ -551,6 +552,9 @@ void sdcard_init(bool useDMA)
{ {
#ifdef SDCARD_DMA_CHANNEL_TX #ifdef SDCARD_DMA_CHANNEL_TX
useDMAForTx = useDMA; useDMAForTx = useDMA;
if (useDMAForTx) {
dmaInit(dmaGetIdentifier(SDCARD_DMA_CHANNEL_TX), OWNER_SDCARD, 0);
}
#else #else
// DMA is not available // DMA is not available
(void) useDMA; (void) useDMA;