平台 | 内核版本 | SDK |
---|---|---|
PX3 | Linux3.1 | Android7.1 |
目录:
frameworks/base/services/core/jni/com_android_server_FMService.cpp
因为要调用hardware
中的函数,因此需要添加头文件:
#include
- 1
注册JNI
方法
int register_android_server_FMService(JNIEnv *env) {
return jniRegisterNativeMethods(env, "com/android/server/FMService", method_table, NELEM(method_table));
}
- 1
- 2
- 3
JNI
方法表
/*JNI方法表*/
static const JNINativeMethod method_table[] = {
{"init_native", "()Z", (void*)tea5767_init},
{"getADC_native", "()I", (void*)tea5767_getADC},
{"getFreq_native", "
- 1
- 2
- 3
- 4

交个朋友:加V领优惠卷
微信名片


评论记录:
回复评论: