📄 sdhal.h
字号:
/****************************************Copyright (c)**************************************************
** Guangzhou ZLG-MCU Development Co.,LTD.
** graduate school
** http://www.zlgmcu.com
**
**--------------File Info-------------------------------------------------------------------------------
** File name: sdhal.h
** Last modified Date: 2005-1-6
** Last Version: V1.0
** Descriptions: Soft Packet of SD Card Driver: hard abstrast layer ---- Physical layer for SD card
**
**------------------------------------------------------------------------------------------------------
** Created by: Ming Yuan Zheng
** Created date: 2005-1-6
** Version: V1.0
** Descriptions: The original version
**
**------------------------------------------------------------------------------------------------------
** Modified by: Jing.Zhang
** Modified date: 2005-12-19
** Version:
** Descriptions:
**
**------------------------------------------------------------------------------------------------------
** Modified by:
** Modified date:
** Version:
** Descriptions:
**
********************************************************************************************************/
#ifndef __SD_HAL_H__
#define __SD_HAL_H__
#include "alt_types.h"
#include "zlg_avalon_spi.h"
/* check whether the SD card is inserted entirely */
extern INT8U SD_ChkCard(void);
/* check whether the SD card is in the Write-protection status */
extern INT8U SD_ChkCardWP(void);
/* initialize the hardware that related to SD card */
extern void SD_HardWareInit(void);
/* send a byte by SPI interface */
extern void SPI_SendByte(INT8U byte);
/* receive a byte from SPI interface */
extern INT8U SPI_RecByte(void);
/* select the SPI slave */
static ALT_INLINE void ALT_ALWAYS_INLINE SPI_CS_Assert(void)
{
SPI_SS_ASSERT();
}
/* not select the SPI slave */
static ALT_INLINE void ALT_ALWAYS_INLINE SPI_CS_Deassert(void)
{
SPI_SS_DEASSERT();
}
#endif /* __SD_HAL_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -