Skip to content

Commit 324a94f

Browse files
committed
mbed-os: add latest out-of-tree patches
1 parent a0b596d commit 324a94f

File tree

2 files changed

+80
-0
lines changed

2 files changed

+80
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
From cc47c9bdedc7c2841c3200c62dd6aa5658f4587e Mon Sep 17 00:00:00 2001
2+
From: pennam <[email protected]>
3+
Date: Thu, 10 Nov 2022 14:04:15 +0100
4+
Subject: [PATCH 181/182] Portenta: WHD: add function to mount wlan firmware fs
5+
from WiFi library
6+
7+
---
8+
.../COMPONENT_WHD/port/wiced_filesystem.cpp | 5 +++++
9+
.../COMPONENT_WHD/port/wiced_filesystem.h | 9 +++++++++
10+
2 files changed, 14 insertions(+)
11+
12+
diff --git a/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_PORTENTA_H7/COMPONENT_WHD/port/wiced_filesystem.cpp b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_PORTENTA_H7/COMPONENT_WHD/port/wiced_filesystem.cpp
13+
index bea07abdef..31405c9d77 100644
14+
--- a/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_PORTENTA_H7/COMPONENT_WHD/port/wiced_filesystem.cpp
15+
+++ b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_PORTENTA_H7/COMPONENT_WHD/port/wiced_filesystem.cpp
16+
@@ -170,6 +170,11 @@ wiced_result_t wiced_filesystem_mount(BlockDevice *device, wiced_filesystem_hand
17+
return WICED_ERROR;
18+
}
19+
20+
+wiced_result_t wiced_filesystem_mount_default(void)
21+
+{
22+
+ return wiced_filesystem_mount(mbr_bd, 0, &resource_fs_handle, WIFI_DEFAULT_MOUNT_NAME);
23+
+}
24+
+
25+
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)
26+
{
27+
/* This is called by mbed test system */
28+
diff --git a/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_PORTENTA_H7/COMPONENT_WHD/port/wiced_filesystem.h b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_PORTENTA_H7/COMPONENT_WHD/port/wiced_filesystem.h
29+
index a65aa3c148..77d49d1820 100644
30+
--- a/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_PORTENTA_H7/COMPONENT_WHD/port/wiced_filesystem.h
31+
+++ b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_PORTENTA_H7/COMPONENT_WHD/port/wiced_filesystem.h
32+
@@ -81,6 +81,15 @@ typedef int wiced_filesystem_handle_type_t;
33+
*/
34+
wiced_result_t wiced_filesystem_init(void);
35+
36+
+/**
37+
+ * Mount the physical device using default parameters
38+
+ *
39+
+ * This assumes that the device is ready to read/write immediately.
40+
+ *
41+
+ * @return WICED_SUCCESS on success
42+
+ */
43+
+wiced_result_t wiced_filesystem_mount_default(void);
44+
+
45+
/**
46+
* Open a file for reading or writing
47+
*
48+
--
49+
2.38.1
50+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
From e110be9600cfa320ed60cc07f7b0917727f49e2e Mon Sep 17 00:00:00 2001
2+
From: Riccardo <[email protected]>
3+
Date: Mon, 14 Nov 2022 11:12:56 +0100
4+
Subject: [PATCH 182/182] STM32: fix HRTIM pwm corner cases (0-100%)
5+
6+
---
7+
targets/TARGET_STM/pwmout_api.c | 6 +++---
8+
1 file changed, 3 insertions(+), 3 deletions(-)
9+
10+
diff --git a/targets/TARGET_STM/pwmout_api.c b/targets/TARGET_STM/pwmout_api.c
11+
index 906dc1dcfd..e20ac918a3 100644
12+
--- a/targets/TARGET_STM/pwmout_api.c
13+
+++ b/targets/TARGET_STM/pwmout_api.c
14+
@@ -359,10 +359,10 @@ void pwmout_write(pwmout_t *obj, float value)
15+
16+
#if defined(HRTIM1)
17+
if (obj->pwm == PWM_I) {
18+
- if (value < (float)0.0) {
19+
- value = 0.0;
20+
- } else if (value > (float)1.0) {
21+
+ if (value <= (float)0.0) {
22+
value = 1.0;
23+
+ } else if (value >= (float)1.0) {
24+
+ value = 0.0;
25+
}
26+
obj->pulse = (uint32_t)((float)obj->period * value + 0.5);
27+
sConfig_compare.CompareValue = obj->pulse;
28+
--
29+
2.38.1
30+

0 commit comments

Comments
 (0)