Skip to content

Commit

Permalink
GNSS: Add new function to remove the backup file
Browse files Browse the repository at this point in the history
  • Loading branch information
SPRESENSE committed Feb 13, 2023
1 parent 813bd28 commit 3c2ae7c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,19 @@ int SpGnss::saveEphemeris(void)
return ret;
}

/**
* @brief Remove the backup data stored in the Flash
* @return 0 if success, -1 if failure
*/
int SpGnss::removeEphemeris(void)
{
#ifdef CONFIG_CXD56_GNSS_BACKUP_FILENAME
return unlink(CONFIG_CXD56_GNSS_BACKUP_FILENAME);
#else
return -1;
#endif
}

/**
* @brief Get the QZQSM DC report data
* @return the pointer to DC Report structure if valid, otherwise NULL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,12 @@ class SpGnss
*/
int saveEphemeris(void);

/**
* @brief Remove the backup data stored in the Flash
* @return 0 if success, -1 if failure
*/
int removeEphemeris(void);

/**
* @brief Get the QZQSM DC report data
* @return the pointer to DC Report structure if valid, otherwise NULL
Expand Down

0 comments on commit 3c2ae7c

Please sign in to comment.