Files
stm32-cnn/HARDWARE/SDIO/sdio.h
2024-12-19 14:06:05 +08:00

50 lines
1.9 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//-----------------------------------------------------------------
// 程序描述:
// SD卡驱动程序头文件
// 作 者: 凌智电子
// 开始日期: 2018-08-04
// 完成日期: 2018-08-04
// 修改日期:
// 当前版本: V1.0
// 历史版本:
// - V1.0: (2018-08-04) SD卡初始化和读写
// 调试工具: 凌智STM32F429+CycloneIV电子系统设计开发板、LZE_ST_LINK2
// 说 明:
//
//-----------------------------------------------------------------
//-----------------------------------------------------------------
// 头文件包含
//-----------------------------------------------------------------
#ifndef _SDIO_H
#define _SDIO_H
#include "stm32f429_winner.h"
//-----------------------------------------------------------------
//-----------------------------------------------------------------
// 宏定义
//-----------------------------------------------------------------
#define SD_TIMEOUT ((uint32_t)100000000) // 超时时间
#define SD_DMA_MODE 0 // 1DMA模式0查询模式
//-----------------------------------------------------------------
// 声明
//-----------------------------------------------------------------
extern SD_HandleTypeDef SDCARD_Handler; // SD卡句柄
extern HAL_SD_CardInfoTypedef SDCardInfo; // SD卡信息结构体
//-----------------------------------------------------------------
// 函数声明
//-----------------------------------------------------------------
extern u8 SD_Init(void);
extern u8 SD_GetCardInfo(HAL_SD_CardInfoTypedef *cardinfo);
extern u8 SD_ReadDisk(u8* buf,u32 sector,u32 cnt);
extern u8 SD_WriteDisk(u8 *buf,u32 sector,u32 cnt);
extern u8 SD_ReadBlocks_DMA(uint32_t *buf,uint64_t sector,uint32_t blocksize,uint32_t cnt);
extern u8 SD_WriteBlocks_DMA(uint32_t *buf,uint64_t sector,uint32_t blocksize,uint32_t cnt);
#endif
//-----------------------------------------------------------------
// End Of File
//-----------------------------------------------------------------