CH582M SPI单字节发送报错未定义。已经引用CH58x_common.h了。如下图
之前在CH573F正常使用的,换到CH582M上就报错未定义
c:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: ./src/Main.o: in func
tion `Epaper_Write_Command':
C:UsersAdministratorDocumentsCH582M_EPDobj/../src/Main.c:206: undefined reference to `SPI0_MasterSendByte'
c:/mounriver/mounriver_studio/toolchain/risc-v embedded gcc/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld.exe: ./src/Main.o: in function `Epaper_Write_Data':
C:UsersAdministratorDocumentsCH582M_EPDobj/../src/Main.c:219: undefined reference to `SPI0_MasterSendByte'
代码片段如下
void Epaper_Write_Command(unsigned char cmd)
{
EPD_3C266_DC_0; // command write
GPIOA_ResetBits( CS_Pin );
SPI0_MasterSendByte(cmd);
GPIOA_SetBits( CS_Pin );
EPD_3C266_DC_1;
}
void Epaper_Write_Data(unsigned char datas)
{
EPD_3C266_DC_1; // data write
GPIOA_ResetBits( CS_Pin );
SPI0_MasterSendByte(datas);
GPIOA_SetBits(CS_Pin);
//DelayUs(2);
}