Files
ArduinoCore-mbed/patches/0192-Opta-WHD-add-function-to-mount-wlan-firmware-fs-from.patch
Martino Facchin b20c4e0bcf Update patchset
2023-03-01 09:19:18 +01:00

51 lines
2.2 KiB
Diff

From a97d37232d096b8947b01c1bcec2689da41062ea Mon Sep 17 00:00:00 2001
From: pennam <m.pennasilico@arduino.cc>
Date: Mon, 14 Nov 2022 17:02:33 +0100
Subject: [PATCH 192/204] Opta: WHD: add function to mount wlan firmware fs
from WiFi library
---
.../TARGET_OPTA/COMPONENT_WHD/port/wiced_filesystem.cpp | 5 +++++
.../TARGET_OPTA/COMPONENT_WHD/port/wiced_filesystem.h | 9 +++++++++
2 files changed, 14 insertions(+)
diff --git a/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_OPTA/COMPONENT_WHD/port/wiced_filesystem.cpp b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_OPTA/COMPONENT_WHD/port/wiced_filesystem.cpp
index 43f0ff22a5..9b7d76409e 100644
--- a/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_OPTA/COMPONENT_WHD/port/wiced_filesystem.cpp
+++ b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_OPTA/COMPONENT_WHD/port/wiced_filesystem.cpp
@@ -170,6 +170,11 @@ wiced_result_t wiced_filesystem_mount(BlockDevice *device, wiced_filesystem_hand
return WICED_ERROR;
}
+wiced_result_t wiced_filesystem_mount_default(void)
+{
+ return wiced_filesystem_mount(mbr_bd, 0, &resource_fs_handle, WIFI_DEFAULT_MOUNT_NAME);
+}
+
wiced_result_t wiced_filesystem_file_open(wiced_filesystem_t *fs_handle, wiced_file_t *file_handle_out, const char *filename, wiced_filesystem_open_mode_t mode)
{
/* This is called by mbed test system */
diff --git a/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_OPTA/COMPONENT_WHD/port/wiced_filesystem.h b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_OPTA/COMPONENT_WHD/port/wiced_filesystem.h
index a65aa3c148..77d49d1820 100644
--- a/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_OPTA/COMPONENT_WHD/port/wiced_filesystem.h
+++ b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_OPTA/COMPONENT_WHD/port/wiced_filesystem.h
@@ -81,6 +81,15 @@ typedef int wiced_filesystem_handle_type_t;
*/
wiced_result_t wiced_filesystem_init(void);
+/**
+ * Mount the physical device using default parameters
+ *
+ * This assumes that the device is ready to read/write immediately.
+ *
+ * @return WICED_SUCCESS on success
+ */
+wiced_result_t wiced_filesystem_mount_default(void);
+
/**
* Open a file for reading or writing
*
--
2.39.1