void SPI1_Config(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
RCC_APB2PeriphClockCmd(
RCC_APB2Periph_GPIOA, ENABLE);
GPIO_InitStructure.GPIO_Pin = SPI1_SCK | SPI1_MOSI;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_Init(
SPI1_PORT, &GPIO_InitStructure);
//SPI_MISO
GPIO_InitStructure.GPIO_Pin = SPI1_MISO;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;
GPIO_Init(SPI1_PORT, &GPIO_InitStructure);
}
/* SPI1管脚定义*/
#define SPI1_PORT GPIOC
#define SPI1_SCK GPIO_Pin_10
#define SPI1_MISO GPIO_Pin_11
#define SPI1_MOSI GPIO_Pin_12
源码编译结果
stm32f10x_it.c: Error: command-line: #564: cannot open preprocessing output output file ".神舟IV号stm32f10x_it.d": No such file or directory
void SPI1_Config(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
RCC_APB2PeriphClockCmd(
RCC_APB2Periph_GPIOA, ENABLE);
GPIO_InitStructure.GPIO_Pin = SPI1_SCK | SPI1_MOSI;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_Init(
SPI1_PORT, &GPIO_InitStructure);
//SPI_MISO
GPIO_InitStructure.GPIO_Pin = SPI1_MISO;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;
GPIO_Init(SPI1_PORT, &GPIO_InitStructure);
}
/* SPI1管脚定义*/
#define SPI1_PORT GPIOC
#define SPI1_SCK GPIO_Pin_10
#define SPI1_MISO GPIO_Pin_11
#define SPI1_MOSI GPIO_Pin_12
源码编译结果
stm32f10x_it.c: Error: command-line: #564: cannot open preprocessing output output file ".神舟IV号stm32f10x_it.d": No such file or directory
举报