Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lukkass222 opened this issue Nov 27, 2022 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@lukkass222
Copy link
Contributor

lukkass222 commented Nov 27, 2022

.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.

  • library version ----------- 1.1.4
  • LCD display type---------SSD1306_128x64_I2C
  • OS ----------------------- windows
  • Platform ----------------- arduino nano old bootloader Atmega328
  • IDE------------------------platformIo VScode
@lukkass222 lukkass222 added the bug Something isn't working label Nov 27, 2022
@lexus2k
Copy link
Owner

lexus2k commented Nov 29, 2022

@LuKkas2101

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

@lexus2k
Copy link
Owner

lexus2k commented Nov 29, 2022

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
Copy link
Owner

lexus2k commented Nov 29, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants