jeremyjh / ESP32_TFT_library

Full featured TFT library for ESP32 with demo application
47 stars 23 forks source link

C++ Support - tftspi.h missing extern "C" macros #7

Closed JMare closed 4 years ago

JMare commented 4 years ago

Pretty much all in the title: While tft.h has extern c macros to allow calling from c++ main components, tftspi.h needs these tags so that TFT_PinsInit() and TFT_display_init() can be called from a project compiled as c++.

jeremyjh commented 4 years ago

You don't need to include tftspi.h directly. tft.h includes it inside the extern block. So you only need to include tft.h in your application and it will work fine. I used this library in a C++ project.

JMare commented 4 years ago

Ahh, got it, that did the trick! Thank you, closing this now.