Open RaiBnod opened 5 years ago
Hello @Aidan275, as you already did some code on C for doing GPIO operation. Can you please share the code.
I have created just a base class for generating the JNI libraries for doing communication with native C on commit: https://github.com/NubeIO/iot-engine/commit/d72c5204f26825abbafdf17bd4ea08d5ed4972d4.
Adding additional info:
BBBiO example: https://github.com/Aidan275/BBBiO Parent ticket: https://github.com/NubeIO/NubeEdge28/issues/1
@Aidan275 I had forked your C++ code and did small changes https://github.com/RaiBnod/BBBiO for testing. And for Java JNI call, I had made a Java micro-service base https://github.com/NubeIO/iot-engine/commit/478e478095eb1d2cd1c0144c3ae46e47080dcd56, where we can generate native library. With the help of the native build library and that Java native functional interface we can able to communicate with C.
But currently, it only supports digital read/write operations. And still we following todo tasks to complete on C:
Could you please help me on this.
Prepare C/C++ code (SPI/PWM/GPIO of BBB) with APIs which can be called from Java (http://jonisalonen.com/2012/calling-c-from-java-is-easy)
Main functions needed at the moment are:
Resources:
Java need to provide interface
and build a header
file then C++ implementation should be in
https://github.com/NubeIO/BBBiO
GPIO functionalities will be written on C/C++. And we need able to call that functions from Java for doing GPIO operations.
Parent ticket: #42