|
我的初始化时这样的,看对不对。
void Init_SPIFullDuplex(void)
{
/*Set the MOSI,MISO and SCK at high level*/
//GPIO_ExternalPullUpConfig(GPIOB, GPIO_Pin_5 | GPIO_Pin_6 | GPIO_Pin_7, ENABLE);
SPI_DeInit(SPI1);
SPI_Init(SPI1, SPI_FirstBit_MSB, SPI_BaudRatePrescaler_4, SPI_Mode_Master, SPI_CPOL_High,
SPI_CPHA_2Edge, SPI_Direction_2Lines_FullDuplex, SPI_NSS_Soft, 0x07);
SPI_Cmd(SPI1, ENABLE);
/* Otherwise the LCD display doesn't work when the board is powered-up ... */
WaitDelay(50);
}
我main 函数添加 unsigned char SPI_write(BYTE value)
出现如下错误
#error cpstm8 ..\..\src\main.c:46(29) old style argument declaration
#error cpstm8 ..\..\src\main.c:48(33) old style argument declaration
谁帮忙看下问题在哪。 |
|