Static library download links
peripheral_api.a
Header files
peripheral_api.h
Test demos
test.c
First you need to have a cross-compiler. You need to download the sdk, the cross-compiler is inside the sdk
After downloading and unpacking, the cross-compiler is in the prebuilts directory of this path. Then run the following command to configure the environment variables
export PATH=$PATH:${sdk directory path}/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin
export CROSS_COMPILE=aarch64-linux-gnu-
export ARCH=arm64
Then execute the following command to compile the demo
aarch64-linux-gnu-gcc test.c peripheral_api.a -o test
If you need to compile the user's own program, you can replace test.c with the user's own source code