I hope the SPI GLCD lib is compatible to the ST7920 LCD?
But anyway, there are another problem--
The problem is Spi1_Init_Advanced...
If I do this
Code: Select all
program Bluepill;
{ Declarations section }
{// LCD module connections
var LCD_RS : sbit at GPIOB_ODR.B4;
var LCD_EN : sbit at GPIOB_ODR.B5;
var LCD_D4 : sbit at GPIOB_ODR.B6;
var LCD_D5 : sbit at GPIOB_ODR.B7;
var LCD_D6 : sbit at GPIOB_ODR.B8;
var LCD_D7 : sbit at GPIOB_ODR.B9;
// End LCD module connections }
//*************************************************************************
// Port Expander module connections
var SPExpanderRST : sbit at GPIOB_ODR.B0;
SPExpanderCS : sbit at GPIOB_ODR.B1;
// End Port Expander module connections
// Initialize SPI module used with PortExpander
SPI1_Init_Advanced(_SPI_FPCLK_DIV4, _SPI_MASTER or _SPI_8_BIT or
_SPI_CLK_IDLE_LOW or _SPI_FIRST_CLK_EDGE_TRANSITION or
_SPI_MSB_FIRST or _SPI_SS_DISABLE or _SPI_SSM_ENABLE or _SPI_SSI_1,
@_GPIO_MODULE_SPI1_PB345);
//*************************************************************************
21 304 Syntax error: Expected ":" but "(" found Bluepill.mpas
21 337 Unknown type "_SPI_FPCLK_DIV4" Bluepill.mpas
21 314 Identifier "SPI1_Init_Advanced" has been already declared in "__Lib_SPI_123_3XX.mpas" Bluepill.mpas
21 301 ","is not valid identifier Bluepill.mpas
21 304 Syntax error: Expected ";" but "_SPI_MASTER" found Bluepill.mpas
21 304 Syntax error: Expected "." but "or" found Bluepill.mpas
0 102 Finished (with errors): 26 Jan 2021, 19:50:32 Bluepill.mppar