2025-03-05 7:41 AM
Hi,
I have downloaded the STSW-IMG302_LNX which has this description "Linux driver for VD6283 6-channel ambient light sensor, with flicker extraction expansion application programming interface (API)", I want to compile this driver for my embedded linux for arm64 platform, I don't know how can I compile it as there are number of files and folders as shown below.
The read me doesn't help me either. Do I need to make a module out of it and load that in my embedded linux ? if so then how ? I tried following,
I used aarch64-linux-gcc compiler. What I did was I executed make all which produced the build folder with a number of .o files, then I created an .a archive file out of it using command ar r mylib.a build/*.o and now I am not sure if I am suppose to make a main.c file and use this library when compiling my main.c file. I didn't find any good documentation and README file for the procedure. Following is where my sensor is connected on my embedded linux.
# i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
20: 20 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
# i2cget -y 1 0x20 0x00
0x70
#
Please advice me.