lexus2k / lcdgfx

Driver for LCD displays running on Arduino/Avr/ESP32/Linux (including Rasperry) platforms
MIT License
356 stars 51 forks source link

disabling all "SPI" or "I2C" macros in "UserSettings.h" causes a compilation error. #96

Open lukkass222 opened 1 year ago

lukkass222 commented 1 year ago

.pio\libdeps\nanoatmega328\lcdgfx\src/v2/lcd/sh1107/lcd_sh1107.h:467:32: error: template argument 1 is invalid InterfaceSH1107 m_spi; ^ .pio\libdeps\nanoatmega328\lcdgfx\src/v2/lcd/sh1107/lcd_sh1107.h:459:10: error: 'void DisplaySH1107_64x128_SPI::begin()' marked 'override', but does not override void begin() override;

To Reproduce:

to reproduce the error is easy just open an example of i2c. I used this "menu_demo.ino". comment out all settings associated with the SPI in UserSettings.h.

enabling "#define CONFIG_ARDUINO_SPI_ENABLE" or "#define CONFIG_AVR_SPI_ENABLE", resolves the error.

the problem seems to be caused by classes referencing base classes.

Expected behavior Compilation without error.

lexus2k commented 1 year ago

@LuKkas2101

Thank you for reporting the issue. If you have any fix ready for pull request, let me know

lexus2k commented 1 year ago
In file included from c:\Users\Alex\Documents\Arduino\libraries\lcdgfx\src/nano_gfx_types.h:31:0,
                 from c:\Users\Alex\Documents\Arduino\libraries\lcdgfx\src/lcdgfx.h:30,
                 from C:\Users\Alex\AppData\Local\Temp\.arduinoIDE-unsaved20221029-28016-22wp1n.z2kf5\ssd1306_demo\ssd1306_demo.ino:39:
c:\Users\Alex\Documents\Arduino\libraries\lcdgfx\src/lcd_hal/io.h:625:2: error: #error "Platform not supported"
 #error "Platform not supported"
  ^~~~~
lexus2k commented 1 year ago

@LuKkas2101 Why are you trying to disable all SPI interfaces? This will not reduce memory usage