GPS的GPIO配置文件
客户需要更改此变量C_GNSS_RF_ELNA_GPIO_NUM_DEFAULT才能覆盖NAVRF驱动程序ELNA设置。
modem_proc/gps/gnss/mgp/me/gen8/src/cgps_ext.c
/* Customer needs to change this variable in order to override NAVRF driver ELNA setting */
gnss_ExternalGNSSConfigStruct gnssz_ExtElnaCfg =
{ GNSS_RF_HAS_ELNA, 80, NULL, C_NAVRF_NPA_RESOURCE_NAME_DEFAULT, C_PMIC_NPA_MODE_ID_RF_MODE_DEFAULT};
或者,
modem_proc/gps/gnss/mgp/me/gen8/src/cgps_ext.c
/* Customer needs to change this variable in order to override NAVRF driver ELNA setting */gnss_ExternalGNSSConfigStruct gnssz_ExtElnaCfg =
{ GNSS_RF_HAS_ELNA, C_GNSS_RF_ELNA_GPIO_NUM_DEFAULT, NULL, C_NAVRF_NPA_RESOURCE_NAME_DEFAULT, C_PMIC_NPA_MODE_ID_RF_MODE_DEFAULT};
modem_proc/gps/api/gnss_api.h
#define C_GNSS_RF_ELNA_GPIO_NUM_DEFAULT 98
linux系统中GPIO的设置
命令操作如下:(不同环境目录可能会有不同)
cd /sys/class/gpio
echo "1">export (测试gpio1)
cd gpio1
cat direction(查看gpio1是否有对应的输入输出的字符)
【in:输入,out:输出】
echo "out">direction
echo "1">value (该操作把gpio1置为1)
echo "0">value(该操作把gpio1置为0)