Closed tobychui closed 3 months ago
Hi!
After some googling it seems that your board CH552G and ch55xdruino does not use C++ libraries, but C libraries instead.
This explains the error messages from your build.
Classes does not exist in C: error 1: Syntax error, declaration ignored at 'class'
.
Neither does default parameter values: D:\Projects\Lab-bench power supply\lcd\lcd-test\lcd\ShiftLcd.h:22: syntax error: token -> '=' ; column 40
I'm sure that this library could be rewritten in C just by looking at the existing logic, but since I don't have hardware to test on I will not try to do that.
Feel free to try it yourself and let me know if it works out!
Hi eb1992, thanks for the great work!
I was trying to use ShiftLcd with CH552G using the ch55xdruino board definitions. However, I am getting this error message
And it is the compilation result from an empty sketch with only the library imported (and the .cpp and .h files are under the lcd folder)
I have read your code in the
src
folder, seems this implementation didn't depends onWire.h
or other CH55x not supported library. Might I have some clues on how I can fix this by changing the source code of the.cpp
or the.h
file? Thanks in advance!