What exactly are you trying to achieve? The primary function of C header files is to describe the signature of functions that are implemented elsewhere - either in a matching C source file or a compiled library. There would be no point including the header file unless you had also ported over the code that goes with it.
Yes, it would be best for me to explain what i am doing. I am trying to get my RA8875 display to work with my pynq board.
Below is the link to the display i am using:
For any .c files i make to work with the screen i need to include both Adafruit_RA8875 library and Adafruit-GFX-Library.
Here are links to both bellow:
When i look through both libraries i noticed so many .h and .cpp were being used that it didn't make sense to use %%microblaze base_overlay.arduino.
Right now i am trying to decide if it worth taking the time to go through every file (probably 10 or less files) and modify them to work with pynq to get this screen to work.
1 of 1 people found this helpful
Not sure if you have seen it or not but there is an example included with the PYNQ-Z1/Z2 build on using the Adafruit 1.8" LCD (Arduino) Shield on the PYNQ-Z1/Z2 and accessing it with Jupyter Notebooks.
Looks like it started off as a MS432 Launchpad project which Adafruit then adapted for use with Arduino, and which then Xilinx adapted it for use with PYNQ.
However, perhaps you can compare the Adafruit Arduino code with the Xilinx PYNQ code to see what changes were made.
Note that this PYNQ example appears to relate to the original v1 version of the Adafruit 1.8" LCD Shield and not the current v2 version. In the v2 version, Adafruit changed the analogue based output for the joystick switch to a digital I2C output using their 'seesaw' interface, and added three additional input buttons.
There are a couple of additional Arduino shield examples in the PYNQ build for the Sparkfun 14180 'Ardumoto' and 9760 joystick shields:
Thanks for pointing out that the code might have been based off of MS432. Awhile back i was trying to find the original library the lcd18 library was based on but with no luck. i will take a look at it and see if its what i am looking for.
kevin_v Ok, let me show you the relationship between .h and .cpp or .c. First a file.h is a header file that only allows access to some (public) functions in file.cpp.
Second, both of the processors in question PYNQ and Arduino are two different hardware platforms. Third not only would you have to change all of the addressing but look at
pinmode(n, INPUT): what are you going to do now? Yes this will have to change to the PYNQ code. along with any ping definitions. again what abut digital.Write() same o' same o', etc.
So in closing "Never Give Up, Never Surrender!" .. Capt. Jason Nesmith, NSEA Protector
Thanks for pointing out some of the areas i should look into to when modifying the .h and .cpp files. Sure seems like a lot of stuff to go through though. If you look at my response to Fred's comment you will see a description of what i am trying to achieve. I probably have to import 10 or less files. Do you think it worth me taking the time to modify each files or just make my own header files of what i need to make the screen to work?
Does anyone here have experience with taking Arduino .h file type and was able to modify it to be used with pynq and juptyer? If so, could you include a modified file and the original file it was based off of, so i can take a look at both to understand what changes are needed to be made.
I know there is a document on the pynq website that explains how to make a header files but at least for me its not easy to follow. Here is the link to the document i am referring to: