Skip to content

Commit

Permalink
modules: gnss: Remove FAR descriptions from NMEA converter
Browse files Browse the repository at this point in the history
Remove FAR descriptions from NMEA converter to improve portability.
And, add string.h for memcpy into gnss_nmea.c.
  • Loading branch information
SPRESENSE committed Jun 27, 2023
1 parent 658ee39 commit 027a4a3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
24 changes: 12 additions & 12 deletions sdk/modules/include/gpsutils/cxd56_gnss_nmea.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/****************************************************************************
* modules/include/gpsutils/cxd56_gnss_nmea.h
*
* Copyright 2018,2019 Sony Semiconductor Solutions Corporation
* Copyright 2018, 2019, 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 @@ -83,10 +83,10 @@ extern "C" {

typedef struct
{
FAR char *(FAR *bufReq)(uint16_t); /**< Buffer request callback func */
void(FAR *bufFree)(FAR char *); /**< Buffer free callback func */
int(FAR *out)(FAR char *); /**< Output callback func */
int(FAR *outBin)(FAR char *, uint32_t); /**< Output callback func for binary */
char *(*bufReq)(uint16_t); /**< Buffer request callback func */
void (*bufFree)(char *); /**< Buffer free callback func */
int (*out)(char *); /**< Output callback func */
int (*outBin)(char *, uint32_t); /**< Output callback func for binary */
} NMEA_OUTPUT_CB;

/** Spectrum OUTPUT data */
Expand Down Expand Up @@ -116,7 +116,7 @@ void NMEA_InitMask(void);
* @retval <0 : fail
*/

int NMEA_RegistOutputFunc(FAR const NMEA_OUTPUT_CB *func);
int NMEA_RegistOutputFunc(const NMEA_OUTPUT_CB *func);

/**
* Set NMEA sentence mask
Expand Down Expand Up @@ -161,7 +161,7 @@ uint32_t NMEA_GetMask(void);
* @retval <0 : fail
*/

uint16_t NMEA_Output(FAR const struct cxd56_gnss_positiondata_s* pposdat);
uint16_t NMEA_Output(const struct cxd56_gnss_positiondata_s* pposdat);

/*
* Output QZSS Satellite Report sentence for Disaster and Crisis Management(DC Report)
Expand All @@ -188,7 +188,7 @@ uint16_t NMEA_GalSarRlm_Output(const struct cxd56_gnss_gal_sarrlm_s* dat);
* @retval <0 : fail
*/

uint16_t NMEA_OutputSpectrum(FAR NMEA_SPECTRUM_DATA *spectrumdat);
uint16_t NMEA_OutputSpectrum(NMEA_SPECTRUM_DATA *spectrumdat);

/*
* Extract raw data from position data
Expand All @@ -198,8 +198,8 @@ uint16_t NMEA_OutputSpectrum(FAR NMEA_SPECTRUM_DATA *spectrumdat);
* @retval <0 : fail
*/

int NMEA_ExtractRawData(FAR const struct cxd56_gnss_positiondata_s* pposdat,
FAR struct nmea_raw_s *rawdat);
int NMEA_ExtractRawData(const struct cxd56_gnss_positiondata_s* pposdat,
struct nmea_raw_s *rawdat);

/**
* Initialize NMEA sentence mask for cxd5610 gnss
Expand All @@ -214,7 +214,7 @@ void NMEA_InitMask2(void);
* @retval <0 : fail
*/

int NMEA_RegistOutputFunc2(FAR const NMEA_OUTPUT_CB *func);
int NMEA_RegistOutputFunc2(const NMEA_OUTPUT_CB *func);

/**
* Set NMEA sentence mask for cxd5610 gnss
Expand All @@ -240,7 +240,7 @@ uint32_t NMEA_GetMask2(void);
* @retval <0 : fail
*/

uint16_t NMEA_Output2(FAR const struct cxd56_gnss_positiondata2_s* pposdat);
uint16_t NMEA_Output2(const struct cxd56_gnss_positiondata2_s* pposdat);

/*
* Output QZSS Satellite Report sentence for Disaster and Crisis
Expand Down
1 change: 1 addition & 0 deletions sdk/modules/sensing/gnss/cxd5610nmea/gnss_nmea.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

#include <nuttx/config.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <arch/chip/gnss.h>
#include <gpsutils/cxd56_gnss_nmea.h>
Expand Down

0 comments on commit 027a4a3

Please sign in to comment.