From 0d414de38c51567810a3059010d3889718915d5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Mi=C5=A1i=C4=87?= Date: Fri, 10 Dec 2021 12:18:40 +0100 Subject: [PATCH] px4_manifest: add function declaration for get base EEPROM mtd mtd_manifest:Make it C callable --- .../include/px4_platform_common/mtd_manifest.h | 2 +- .../include/px4_platform_common/px4_manifest.h | 13 +++++++++++++ platforms/nuttx/src/px4/common/px4_manifest.cpp | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/platforms/common/include/px4_platform_common/mtd_manifest.h b/platforms/common/include/px4_platform_common/mtd_manifest.h index 2ab9514573..52fe71e6b0 100644 --- a/platforms/common/include/px4_platform_common/mtd_manifest.h +++ b/platforms/common/include/px4_platform_common/mtd_manifest.h @@ -100,6 +100,6 @@ __EXPORT int px4_mtd_config(const px4_mtd_manifest_t *mft_mtd); * 0 (get !=null) item by type's value is returned at get; * ************************************************************************************/ -__EXPORT int px4_mtd_query(const char *type, const char *val, const char **get = nullptr); +__EXPORT int px4_mtd_query(const char *type, const char *val, const char **get); __END_DECLS diff --git a/platforms/common/include/px4_platform_common/px4_manifest.h b/platforms/common/include/px4_platform_common/px4_manifest.h index 4b93b0961a..bdb6ad1984 100644 --- a/platforms/common/include/px4_platform_common/px4_manifest.h +++ b/platforms/common/include/px4_platform_common/px4_manifest.h @@ -88,6 +88,19 @@ __BEGIN_DECLS __EXPORT const px4_mft_s *board_get_manifest(void); +/************************************************************************************ + * Name: board_get_base_eeprom_mtd_manifest + * + * Description: + * A board will provide this function to return the mtd with eeprom manifest + * + * Returned Value: + * pointer to mtd manifest + * + ************************************************************************************/ + +__EXPORT const px4_mtd_manifest_t *board_get_base_eeprom_mtd_manifest(void); + /************************************************************************************ * Name: px4_mft_configure * diff --git a/platforms/nuttx/src/px4/common/px4_manifest.cpp b/platforms/nuttx/src/px4/common/px4_manifest.cpp index c66d6f9394..d7402215ab 100644 --- a/platforms/nuttx/src/px4/common/px4_manifest.cpp +++ b/platforms/nuttx/src/px4/common/px4_manifest.cpp @@ -100,7 +100,7 @@ __EXPORT int px4_mft_query(const px4_mft_s *mft, px4_manifest_types_e type, if (mft->mfts[m]->type == type) switch (type) { case MTD: - return px4_mtd_query(sub, val); + return px4_mtd_query(sub, val, nullptr); break; case MFT: