Skip to content

Commit

Permalink
examples/ambient_gnsslogger: Add support for gnss addon board
Browse files Browse the repository at this point in the history
Add support for gnss addon board.
- Use /dev/gps for internal gnss
- Use /dev/gps2 for gnss addon
  • Loading branch information
SPRESENSE committed Jun 26, 2023
1 parent 92a64c0 commit adde3b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions examples/ambient_gnsslogger/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,9 @@ config EXAMPLES_AMBIENT_GNSSLOGGER_STACKSIZE
int "Ambient GNSS Logger stack size"
default DEFAULT_TASK_STACKSIZE

config EXAMPLES_AMBIENT_GNSSLOGGER_GPS_DEVNAME
string "GNSS device name"
default "/dev/gps2" if CXD56_GNSS_ADDON
default "/dev/gps"

endif
4 changes: 2 additions & 2 deletions examples/ambient_gnsslogger/gnss_util.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/****************************************************************************
* examples/ambient_gnsslogger/gnss_util.c
*
* Copyright 2022 Sony Semiconductor Solutions Corporation
* Copyright 2022, 2023 Sony Semiconductor Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -87,7 +87,7 @@ int init_gnss(sigset_t *mask)
struct cxd56_gnss_signal_setting_s setting;
struct cxd56_gnss_ope_mode_param_s set_opemode;

fd = open("/dev/gps", O_RDONLY);
fd = open(CONFIG_EXAMPLES_AMBIENT_GNSSLOGGER_GPS_DEVNAME, O_RDONLY);
if (fd < 0)
{
printf("open error:%d,%d\n", fd, errno);
Expand Down

0 comments on commit adde3b2

Please sign in to comment.