Siemens S65 Display Lib For STM32

Can someone help me port this library?
Post Reply
nnm4evr
Posts: 1
Joined: Sat Jul 29, 2017 1:59 pm

Siemens S65 Display Lib For STM32

Post by nnm4evr » Sat Jul 29, 2017 2:06 pm

Can someone port library for Siemens S65 Display (lib in attachment) for STM32 Arduino Board? I have STM32F103 Board (Arduino IDE 1.6.12), but scketch dosen't compile with some errors:

Code: Select all

C:\Program Files (x86)\Arduino\libraries\S65Display\S65Display.cpp: In member function 'void S65Display::init(uint8_t)':
C:\Program Files (x86)\Arduino\libraries\S65Display\S65Display.cpp:44:7: error: 'SPCR' was not declared in this scope
       SPCR = (1<<SPE)|(1<<MSTR); //enable SPI, Master, clk=Fcpu/4
       ^
C:\Program Files (x86)\Arduino\libraries\S65Display\S65Display.cpp:44:18: error: 'SPE' was not declared in this scope
       SPCR = (1<<SPE)|(1<<MSTR); //enable SPI, Master, clk=Fcpu/4
                  ^
C:\Program Files (x86)\Arduino\libraries\S65Display\S65Display.cpp:44:27: error: 'MSTR' was not declared in this scope
       SPCR = (1<<SPE)|(1<<MSTR); //enable SPI, Master, clk=Fcpu/4
                           ^
C:\Program Files (x86)\Arduino\libraries\S65Display\S65Display.cpp:45:7: error: 'SPSR' was not declared in this scope
       SPSR = (1<<SPI2X); //clk*2 = Fcpu/2
       ^
C:\Program Files (x86)\Arduino\libraries\S65Display\S65Display.cpp:45:18: error: 'SPI2X' was not declared in this scope
       SPSR = (1<<SPI2X); //clk*2 = Fcpu/2
                  ^
C:\Program Files (x86)\Arduino\libraries\S65Display\S65Display.cpp:52:37: error: 'SPR0' was not declared in this scope
       SPCR = (1<<SPE)|(1<<MSTR)|(1<<SPR0); //enable SPI, Master, clk=Fcpu/16
                                     ^
C:\Program Files (x86)\Arduino\libraries\S65Display\S65Display.cpp:60:37: error: 'SPR1' was not declared in this scope
       SPCR = (1<<SPE)|(1<<MSTR)|(1<<SPR1); //enable SPI, Master, clk=Fcpu/64
                                     ^
exit status 1
Attachments
S65Display_V2.rar
(36.55 KiB) Downloaded 12 times

User avatar
martinayotte
Posts: 1229
Joined: Mon Apr 27, 2015 1:45 pm

Re: Siemens S65 Display Lib For STM32

Post by martinayotte » Sat Jul 29, 2017 4:44 pm

Those registers are for plain AVR SPI !
You will need to tweak the code to use STM32 SPI, not the one from AVR.
Did you have the proper board selected ?

Post Reply