我正在使用MDK-Pro和文件系统库。
在我的应用程序中,我需要SD卡的SPI接口。我已经设法正确地设置了项目,除了在RTE_Components.h文件中,Keil生成了#define RTE_Drivers_MCI0行,这随后触发了一个预处理器错误("SDIO not configured in RTE_Device.h")。
虽然我可以在RTE_Components.h中手动注释掉这一行,但是我经常更新这个文件,我会遇到上面的问题。有没有人知道到底是什么生成了这个文件,以及我如何阻止它将SDIO相关的定义添加到项目中?
发布于 2014-07-08 20:13:32
不应修改RTE_Components.h,它将始终自动生成。堆栈尝试通过MCI接口连接与您在"FS_Config_MC_0.h“中所做的配置有关。
// <o>Connect to hardware via Driver_MCI# <0-255>
// <i>Select driver control block for hardware interface
#define MC0_MCI_DRIVER 0
// <o>Connect to hardware via Driver_SPI# <0-255>
// <i>Select driver control block for hardware interface when in SPI mode
#define MC0_SPI_DRIVER 0
// <o>Memory Card Interface Mode <0=>Native <1=>SPI
// <i>Native uses a SD Bus with up to 8 data lines, CLK, and CMD
// <i>SPI uses 2 data lines (MOSI and MISO), SCLK and CS
// <i>When using SPI both Driver_SPI# and Driver_MCI# must be specified
// <i>since the MCI driver provides the control interface lines.
#define MC0_SPI 1https://stackoverflow.com/questions/24520604
复制相似问题