Reference for C routines using libraries (target & Zerynth)

Hi there, I’m looking for a general reference to build/port c routines who access the underlying HW.
I’m in the process of building an ESP32-DevKitC based device into which I have to integrate an LCD display (ILI9341 based) that uses the SPI interface.
I’d like to have the LCD routines running in C (plan to import one available from the arduino world)

A working reference to do that under the Zerynth VM & framework would be great. It doesn’t have to be directly portable to other HW platforms.
Also a doc describing the relationship between the VM the target HW platform’s toolchain and the libraries (from the target toolchain & Zerynth) would be great!

Having such a reference would be great to port several working libraries from (at least) de Arduino world. Which would speed up many Zerynth projects and seduce people from that community into Zerynth!

Thanks in advance

Best regards

Hi @Alex1
The C language interface in Zerynth uses the Operative system abstraction layer (VOS), Hardware abstraction layer (VHAL), VM interface.

For the SPI interface, Please have a look at the SPI section in the VHAL layer.
There you’ll find information for accessing these peripherals in C language ( Serial, SPI, PWM,I2c…), Which you can use in porting any library to your Zerynth project.
Then you can use the driver as a C language interface example.
If anything is still unclear, Please let me know. :smile:

Thanks for these suggestions, They’ll be considered.

+1 for this idea. It would be great to be able to use the massive Arduino library collection in Zerynth.