diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/GNSS/GNSS.cpp b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/GNSS/GNSS.cpp index ed08d19f..19bec76e 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/GNSS/GNSS.cpp +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/GNSS/GNSS.cpp @@ -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 diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/GNSS/GNSS.h b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/GNSS/GNSS.h index ff03f338..b74104d0 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/GNSS/GNSS.h +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/GNSS/GNSS.h @@ -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