SD MMC ドライバ STM32F[769I|746G]-Discovery
[詳解]
#include "sysconfig.h"
#include "tkprintf.h"
#include "timer.h"
#include "device.h"
#include "str.h"
#include "interrupt.h"
#include "device/sd_ioctl.h"
#include "task/syscall.h"
#include "dkprintf.h"
[ソースコード]
|
#define | ENABLE_SDMMC_DMA |
|
#define | SD_TIMEOUT (3*1000) |
|
|
void | HAL_SD_ErrorCallback (SD_HandleTypeDef *hsd) |
|
void | HAL_SD_XferErrorCallback (SD_HandleTypeDef *hsd) |
|
void | BSP_SD_AbortCallback (void) |
|
void | BSP_SD_ReadCpltCallback (void) |
|
void | BSP_SD_WriteCpltCallback (void) |
|
static void | inthdr_sdmmc_dma_rx (unsigned int intnum, void *sp) |
|
static void | inthdr_sdmmc_dma_tx (unsigned int intnum, void *sp) |
|
static void | inthdr_sd (unsigned int intnum, void *sp) |
|
static int | sdmmc_register (struct st_device *dev, char *param) |
|
static int | sdmmc_unregister (struct st_device *dev) |
|
static int | sdmmc_open (struct st_device *dev) |
|
static int | sdmmc_close (struct st_device *dev) |
|
static int | sdmmc_block_read (struct st_device *dev, void *data, unsigned int sector, unsigned int blkcount) |
|
static int | sdmmc_block_write (struct st_device *dev, const void *data, unsigned int sector, unsigned int blkcount) |
|
static int | sdmmc_ioctl (struct st_device *dev, unsigned int com, unsigned int arg, void *param) |
|
static int | sdmmc_sync (struct st_device *dev) |
|
static int | sdmmc_suspend (struct st_device *dev) |
|
static int | sdmmc_resume (struct st_device *dev) |
|
|
SD_HandleTypeDef | uSdHandle |
|
static struct st_event | dma_rx_evt |
|
static struct st_event | dma_tx_evt |
|
static int | flg_dma_rx_cmp = 0 |
|
static int | flg_dma_tx_cmp = 0 |
|
static int | flg_sd_cmp = 0 |
|
static uint32_t | sdbuf [BLOCKSIZE] |
|
const struct st_device | sdmmc_device |
|
SD MMC ドライバ STM32F[769I|746G]-Discovery
- 日付
- 2016.01.09
- 著者
- Takashi SHUDO
stm32f7xxx-disc_sdmmc.c に定義があります。
◆ sdmmc_device
初期値:= {
.explan = "STM32F7xxx SD/MMC Storage",
.register_dev = sdmmc_register,
.unregister_dev = sdmmc_unregister,
.open = sdmmc_open,
.close = sdmmc_close,
.block_read = sdmmc_block_read,
.block_write = sdmmc_block_write,
.ioctl = sdmmc_ioctl,
.sync = sdmmc_sync,
.suspend = sdmmc_suspend,
.resume = sdmmc_resume,
}
#define DEF_DEV_NAME_SD
標準ストレージデバイス名(MMC,SD等)
stm32f7xxx-disc_sdmmc.c の 412 行目に定義があります。