6620/6628中如何开关GPS功能模块
时间:10-02
整理:3721RD
点击:
[DESCRIPTION]
通过该FAQ的指导,客户可以根据项目需要自行开关gps的功能。
[SOLUTION]
修改alps/mediatek/config/[Project]/ProjectConfig.mk如下
[Turn on/off]
mtk_GPS_SUPPORT=yes/no
MTK_AGPS_APP=yes/no
MTK_YGPS_APP=yes/no
JB2上还需要修改以下文件
alps\mediatek\config\MT6589\autoconfig\kconfig\platform文件
CONFIG_GPS=y/n
CONFIG_MTK_GPS=y/n
note: GB2的版本,若codegen.dws中没有配置gps sync pin,编译时会有build error,请按如下方
式修改
mediatek/custom/[Project]/kernel/core/src/board.c
int mt_combo_gps_sync_pin_ctrl(int on)
{
#ifdef GPIO_GPS_SYNC_PIN //add this line
if(on)
{
mt_set_gpio_mode(GPIO_GPS_SYNC_PIN, GPIO_GPS_SYNC_PIN_M_GPS_SYNC);
}
else
{
mt_set_gpio_mode(GPIO_GPS_SYNC_PIN, GPIO_MODE_00);
mt_set_gpio_dir(GPIO_GPS_SYNC_PIN, GPIO_DIR_OUT);
mt_set_gpio_out(GPIO_GPS_SYNC_PIN, GPIO_OUT_ZERO);
}
#endif //add this line
}
通过该FAQ的指导,客户可以根据项目需要自行开关gps的功能。
[SOLUTION]
修改alps/mediatek/config/[Project]/ProjectConfig.mk如下
[Turn on/off]
mtk_GPS_SUPPORT=yes/no
MTK_AGPS_APP=yes/no
MTK_YGPS_APP=yes/no
JB2上还需要修改以下文件
alps\mediatek\config\MT6589\autoconfig\kconfig\platform文件
CONFIG_GPS=y/n
CONFIG_MTK_GPS=y/n
note: GB2的版本,若codegen.dws中没有配置gps sync pin,编译时会有build error,请按如下方
式修改
mediatek/custom/[Project]/kernel/core/src/board.c
int mt_combo_gps_sync_pin_ctrl(int on)
{
#ifdef GPIO_GPS_SYNC_PIN //add this line
if(on)
{
mt_set_gpio_mode(GPIO_GPS_SYNC_PIN, GPIO_GPS_SYNC_PIN_M_GPS_SYNC);
}
else
{
mt_set_gpio_mode(GPIO_GPS_SYNC_PIN, GPIO_MODE_00);
mt_set_gpio_dir(GPIO_GPS_SYNC_PIN, GPIO_DIR_OUT);
mt_set_gpio_out(GPIO_GPS_SYNC_PIN, GPIO_OUT_ZERO);
}
#endif //add this line
}