waveshareteam / e-Paper

1.34k stars 596 forks source link

How to obtain a shared lib (.so) for EPD C driver? #359

Open Suniron opened 2 months ago

Suniron commented 2 months ago

Hey there,

I have the 2.7 V2 E-paper screen and I want to bind the C driver with bun:ffi to interact with my screen from Typescript code.

To do that, I need to have the driver as a shared library (.so file). So, how can I compile the C code to obtain this?

Thanks in advance 🤞

mbadinga1 commented 1 month ago

Hey, you can use cmake to build the project instead of the Makefile to get the shared lib.

Suniron commented 1 month ago

Thanks for your answer 🙏.

Would you happen to have an example of the command to build the project?

I never used cmake.. 🥵

mbadinga1 commented 1 month ago

Hello, I have made an example with my 7in5 scrceen using raspi. https://github.com/mbadinga1/Waveshare_7in5_CMAKE

You can try to update it on your project