blob: a3e996db1937845a988e44f090107a9a27610493 [file] [log] [blame]
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <stdlib.h>
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
#include <sys/types.h>
#include <unistd.h>
#include <pthread.h>
#include <termios.h>
#include <time.h>
#include <sys/ioctl.h>
#include <dlfcn.h>
#include <stdint.h>
#include <stdbool.h>
typedef enum{
soc_max=0,
cpu0,
cpu1,
cpu2,
cpu3,
gpu0,
gpu1,
dramc,
mmsys,
md_5g,
md_4g,
md_3g,
soc_dram_ntc,
pa_5g,
pa_4g,
rf_ntc,
pmic,
pmic_vcore,
pmic_vpro,
pmic_vgpu=19,
}ZONE_NUM;
int (*gsw_get_modem_temperture)(ZONE_NUM,int *temp);
void *dlHandle_pm;
char *lynqLib_pm = "/lib/libgsw_lib.so";
int main(void)
{
int ret;
int opt = 0;
int temp;
dlHandle_pm = dlopen(lynqLib_pm, RTLD_NOW);
gsw_get_modem_temperture=(int32_t(*)())dlsym(dlHandle_pm, "gsw_get_modem_temperture");
ret = gsw_get_modem_temperture(0,&temp);
if(ret < 0)
{
printf("gsw_autosleep_enable FAIL.\n");
return -1;
}
printf("gsw_autosleep_enable success.temp : %d\n",temp);
dlclose(dlHandle_pm);
return 0;
}