Hello,
I’m working on a project with a large LCD display on the EDP32-S3.
I have the LCD working with the provided sample code https://github.com/espressif/esp-idf/tr ... /rgb_panel.
However, I’m struggling to write the rest of my app with the ESP-S3. My skills are not good enough.
So I switched to Arduino core. But now I cannot get the RGB LCD panel working.
Is there a way to use the ESP LCD code in Arduino?
Thanks
Using ESP-IDF code in Arduino code?
Re: Using ESP-IDF code in Arduino code?
You can use ESP-IDF in Arduino
-
- Posts: 826
- Joined: Mon Jul 22, 2019 3:20 pm
Re: Using ESP-IDF code in Arduino code?
I suspect your issue is not in using esp-idf in Arduino, but rather using C-style code in C++.
When assigning struct's in C++, you cannot leave missing identifiers, and it will not automatically cast elements into the correct type. There are a few fixes:
- If you are including a header that will have C code in it, use an extern "C" (https://github.com/espressif/arduino-es ... pp#L31-L33)
- If you have missing identifiers, look at the struct definition and add those into the assignment. If you have very few elements to assign in a large struct, do away with the C-style dot assignment, and assign the elements explicitly with the top-level variable (mystruct.myelement = val;)
- If you have invalid conversions, force cast that identifier into the appropriate variable type or use the correct variable type in your assignment
When assigning struct's in C++, you cannot leave missing identifiers, and it will not automatically cast elements into the correct type. There are a few fixes:
- If you are including a header that will have C code in it, use an extern "C" (https://github.com/espressif/arduino-es ... pp#L31-L33)
- If you have missing identifiers, look at the struct definition and add those into the assignment. If you have very few elements to assign in a large struct, do away with the C-style dot assignment, and assign the elements explicitly with the top-level variable (mystruct.myelement = val;)
- If you have invalid conversions, force cast that identifier into the appropriate variable type or use the correct variable type in your assignment
-
- Posts: 33
- Joined: Thu Dec 13, 2018 1:39 am
Re: Using ESP-IDF code in Arduino code?
Yes you can. Your Arduino code is simply... calling low-level ESP-IDF functions.
So you can skip these "macros" and call these ESP-IDF functions directly.
So you can skip these "macros" and call these ESP-IDF functions directly.
Re: Using ESP-IDF code in Arduino code?
Thank you, this was very helpful.
Who is online
Users browsing this forum: No registered users and 94 guests