Skip to content

Commit

Permalink
nrf91: Support using different nbuffer for each topic
Browse files Browse the repository at this point in the history
Signed-off-by: wangjianyu3 <[email protected]>
  • Loading branch information
JianyuWang0623 committed Nov 30, 2024
1 parent bc2ec5e commit 8039963
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion arch/arm/src/nrf91/nrf91_modem_gnss.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

#include <debug.h>
#include <string.h>
#include <sys/param.h>
#include <time.h>

#include <nuttx/sensors/gnss.h>
Expand Down Expand Up @@ -689,6 +690,13 @@ static int nrf91_gnss_thread(int argc, char** argv)
int nrf91_gnss_register(int devno, uint32_t batch_number)
{
int ret = OK;
uint32_t nbuffer[] = {
[SENSOR_GNSS_IDX_GNSS] = batch_number,
[SENSOR_GNSS_IDX_GNSS_SATELLITE] = batch_number,
[SENSOR_GNSS_IDX_GNSS_MEASUREMENT] = batch_number,
[SENSOR_GNSS_IDX_GNSS_CLOCK] = batch_number,
[SENSOR_GNSS_IDX_GNSS_GEOFENCE] = batch_number,
};

if (!nrf_modem_is_initialized())
{
Expand Down Expand Up @@ -728,5 +736,5 @@ int nrf91_gnss_register(int devno, uint32_t batch_number)

g_nrf91_gnss.lower.ops = &g_nrf91_gnss_ops;

return gnss_register(&g_nrf91_gnss.lower, devno, batch_number);
return gnss_register(&g_nrf91_gnss.lower, devno, nbuffer, nitems(nbuffer));
}

0 comments on commit 8039963

Please sign in to comment.