(mynewt-core) branch master updated: hw/cmsis-core: Update CMSIS to 5.4.0 release

2024-02-21 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
 new fac0ea9a0 hw/cmsis-core: Update CMSIS to 5.4.0 release
fac0ea9a0 is described below

commit fac0ea9a01c512850e811d57547d200f6a4b19fa
Author: Szymon Janc 
AuthorDate: Tue Feb 20 16:54:39 2024 +0100

hw/cmsis-core: Update CMSIS to 5.4.0 release

5.3.0 has broken MPU support.
---
 hw/cmsis-core/pkg.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/cmsis-core/pkg.yml b/hw/cmsis-core/pkg.yml
index 57923fe31..cab748078 100644
--- a/hw/cmsis-core/pkg.yml
+++ b/hw/cmsis-core/pkg.yml
@@ -32,7 +32,7 @@ pkg.include_dirs:
 
 repository.arm-CMSIS_5:
 type: github
-vers: 5.3.0-commit
+vers: 5.4.0-commit
 branch: master
 user: ARM-software
 repo: CMSIS_5



Re: [PR] hw/cmsis-core: Update CMSIS to 5.4.0 release [mynewt-core]

2024-02-21 Thread via GitHub


sjanc merged PR #3147:
URL: https://github.com/apache/mynewt-core/pull/3147


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] Some porting fixes [mynewt-nimble]

2024-02-21 Thread via GitHub


sjanc opened a new pull request, #1704:
URL: https://github.com/apache/mynewt-nimble/pull/1704

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] util/crc: Add crc32 and Adler32 algorithms [mynewt-core]

2024-02-21 Thread via GitHub


kasjer merged PR #3144:
URL: https://github.com/apache/mynewt-core/pull/3144


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



(mynewt-core) branch master updated: util/crc: Add crc32 and Adler32 algorithms

2024-02-21 Thread jerzy
This is an automated email from the ASF dual-hosted git repository.

jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
 new 8619cd7aa util/crc: Add crc32 and Adler32 algorithms
8619cd7aa is described below

commit 8619cd7aa807c11568c7aac57e3785c9cf7002bb
Author: Jerzy Kasenberg 
AuthorDate: Tue Feb 20 10:33:08 2024 +0100

util/crc: Add crc32 and Adler32 algorithms

This adds two simple implementations of standard CRC32
and Adler32 algorithms that can be used on block of data
and in streams where result from previous call can
be used as inptu to continue computation.

No prepcomputed table are used for now.
---
 util/crc/include/crc/adler32.h | 38 
 util/crc/include/crc/crc32.h   | 38 
 util/crc/src/adler32.c | 57 ++
 util/crc/src/crc32.c   | 46 ++
 4 files changed, 179 insertions(+)

diff --git a/util/crc/include/crc/adler32.h b/util/crc/include/crc/adler32.h
new file mode 100644
index 0..d7c493da3
--- /dev/null
+++ b/util/crc/include/crc/adler32.h
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+#ifndef _ADLER32_H_
+#define _ADLER32_H_
+
+#include 
+#include 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+uint32_t adler32_init(void);
+uint32_t adler32_calc(uint32_t val, const void *buf, size_t cnt);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ADLER32_H_ */
diff --git a/util/crc/include/crc/crc32.h b/util/crc/include/crc/crc32.h
new file mode 100644
index 0..3f8cb2a40
--- /dev/null
+++ b/util/crc/include/crc/crc32.h
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+#ifndef _CRC32_H_
+#define _CRC32_H_
+
+#include 
+#include 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+uint32_t crc32_init(void);
+uint32_t crc32_calc(uint32_t val, const void *buf, size_t cnt);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _CRC16_H_ */
diff --git a/util/crc/src/adler32.c b/util/crc/src/adler32.c
new file mode 100644
index 0..5a317fd00
--- /dev/null
+++ b/util/crc/src/adler32.c
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+#include 
+#include 
+
+uint32_t
+adler32_init(void)
+{
+return 1;
+}
+
+#define MOD_ADLER 65521
+
+uint32_t
+adler32_calc(uint32_t val, const void *buf, size_t cnt)
+{
+const uint8_t *data = (const uint8_t *)buf;
+uint32_t a = val & 0x;
+uint32_t b = val >> 16;
+
+while (cnt) {
+unsigned tlen = c

[PR] tinyusb/msc_fat_view: Fix custom entries support [mynewt-core]

2024-02-21 Thread via GitHub


kasjer opened a new pull request, #3148:
URL: https://github.com/apache/mynewt-core/pull/3148

   For now msc_fat_view provided several FAT root entries that could be enabled 
in syscfg.
   
   There is function to add new root dir entries msc_fat_view_add_dir_entry(), 
however even if user added custom entry it would not show up since all entries 
were refreshed when during test_unit_ready by call to init_disk_data that 
silently dropped non standard entries and created root from scratch.
   
   Now root population is divided in to two functions. init_disk_data() that 
provides standard enties is called when packaged is initiated and 
update_disk_data() is called when actual sectors for host are generated and 
this function includes user provided entries.
   
   With this change core dump entries have to be initiated after 
msc_fat_view_pkg_init and any time before tinyusb_start


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Fix remove from resolving list issue [mynewt-nimble]

2024-02-21 Thread via GitHub


sjanc merged PR #1673:
URL: https://github.com/apache/mynewt-nimble/pull/1673


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



(mynewt-nimble) branch master updated: nimble/gap: Fix for resolving list peer removal

2024-02-21 Thread janc
This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
 new 620064e69 nimble/gap: Fix for resolving list peer removal
620064e69 is described below

commit 620064e69d47c01be8b31765de8184eed31a86ce
Author: Szymon Czapracki 
AuthorDate: Tue Jan 16 11:02:36 2024 +0100

nimble/gap: Fix for resolving list peer removal

This commit aims to fix an issue where deleting
peer from resolving list would fail due to
lack of IRK on the list.
---
 nimble/host/src/ble_gap.c | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/nimble/host/src/ble_gap.c b/nimble/host/src/ble_gap.c
index 85d7a9e4c..8c63610c6 100644
--- a/nimble/host/src/ble_gap.c
+++ b/nimble/host/src/ble_gap.c
@@ -6202,7 +6202,12 @@ ble_gap_unpair(const ble_addr_t *peer_addr)
 
 rc = ble_hs_pvcy_remove_entry(peer_addr->type,
  peer_addr->val);
-if (rc != 0) {
+
+/* We allow BLE_ERR_UNK_CONN_ID as the IRK of the peer might not be
+ * present on the resolving list, but we still should be able to
+ * remove that entry.
+ */
+if (rc != 0 && rc != (BLE_HS_ERR_HCI_BASE + BLE_ERR_UNK_CONN_ID)) {
 return rc;
 }
 



Re: [PR] nimble/host: Add Broadcast Audio Scan Service [mynewt-nimble]

2024-02-21 Thread via GitHub


MariuszSkamra commented on code in PR #1691:
URL: https://github.com/apache/mynewt-nimble/pull/1691#discussion_r1497290749


##
nimble/host/services/audio/bass/src/ble_audio_svc_bass.c:
##
@@ -0,0 +1,915 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "host/ble_hs.h"
+#include "host/ble_gatt.h"
+#include "../../host/src/ble_gatt_priv.h"
+#include "../../host/src/ble_att_priv.h"
+#include "services/bass/ble_audio_svc_bass.h"
+#include "../../host/audio/include/host/audio/ble_audio_bsnk.h"
+
+#define EXPECTED_LEN_VARIABLE   (-1)
+#define BLE_SVC_AUDIO_BASS_RECEIVE_STATE_SRC_ID_NONE0xFF
+#define BLE_SVC_AUDIO_BASS_RECEIVE_BIS_SYNC_STATE_ANY  0x
+
+enum ble_svc_audio_bass_ctrl_point_op_code {
+BLE_AUDIO_SVC_BASS_REMOTE_SCAN_STOPPED,
+BLE_AUDIO_SVC_BASS_REMOTE_SCAN_STARTED,
+BLE_AUDIO_SVC_BASS_ADD_SOURCE,
+BLE_AUDIO_SVC_BASS_MODIFY_SOURCE,
+BLE_AUDIO_SVC_BASS_SET_BROADCAST_CODE,
+BLE_AUDIO_SVC_BASS_REMOVE_SOURCE
+};
+
+typedef int ble_svc_audio_bass_ctrl_point_handler_cb(uint8_t *data, void *arg);
+
+static struct ble_svc_audio_bass_ctrl_point_ev {
+ble_svc_audio_bass_ctrl_point_ev_fn *ctrl_point_ev_fn;
+void *arg;
+} ctrl_point_ev;
+
+static struct ble_svc_audio_bass_receiver_state
+receiver_states[MYNEWT_VAL(BLE_SVC_AUDIO_BASS_RECEIVE_STATE_MAX)] = {
+[0 ... MYNEWT_VAL(BLE_SVC_AUDIO_BASS_RECEIVE_STATE_MAX) - 1] = {
+.source_id = BLE_SVC_AUDIO_BASS_RECEIVE_STATE_SRC_ID_NONE
+}
+};
+
+static struct ble_audio_event_listener ble_svc_audio_bass_audio_event_listener;
+
+static struct os_mempool ble_audio_svc_bass_metadata_pool;
+static os_membuf_t ble_audio_svc_bass_metadata_mem[
+OS_MEMPOOL_SIZE(MYNEWT_VAL(BLE_SVC_AUDIO_BASS_RECEIVE_STATE_MAX) *
+
MYNEWT_VAL(BLE_SVC_AUDIO_BASS_MAX_SUBGROUPS_PER_RECV_STATE),
+MYNEWT_VAL(BLE_SVC_AUDIO_BASS_METADATA_MAX_SZ))];
+
+static int
+ble_svc_audio_bass_remote_scan_stopped(uint8_t *data, void *arg);
+static int
+ble_svc_audio_bass_remote_scan_started(uint8_t *data, void *arg);
+static int
+ble_svc_audio_bass_add_source(uint8_t *data, void *arg);
+static int
+ble_svc_audio_bass_modify_source(uint8_t *data, void *arg);
+static int
+ble_svc_audio_bass_set_broadcast_code(uint8_t *data, void *arg);
+static int
+ble_svc_audio_bass_remove_source(uint8_t *data, void *arg);
+
+static struct ble_svc_audio_bass_ctrl_point_handler {
+uint8_t op_code;
+int expected_len;
+ble_svc_audio_bass_ctrl_point_handler_cb *handler_cb;
+} ble_svc_audio_bass_ctrl_point_handlers[] = {
+{
+.op_code = BLE_AUDIO_SVC_BASS_REMOTE_SCAN_STOPPED,
+.expected_len = 0,
+.handler_cb = ble_svc_audio_bass_remote_scan_stopped
+}, {
+.op_code = BLE_AUDIO_SVC_BASS_REMOTE_SCAN_STARTED,
+.expected_len = 0,
+.handler_cb = ble_svc_audio_bass_remote_scan_started
+}, {
+.op_code = BLE_AUDIO_SVC_BASS_ADD_SOURCE,
+.expected_len = EXPECTED_LEN_VARIABLE,
+.handler_cb = ble_svc_audio_bass_add_source
+}, {
+.op_code = BLE_AUDIO_SVC_BASS_MODIFY_SOURCE,
+.expected_len = EXPECTED_LEN_VARIABLE,
+.handler_cb = ble_svc_audio_bass_modify_source
+}, {
+.op_code = BLE_AUDIO_SVC_BASS_SET_BROADCAST_CODE,
+.expected_len = 17,
+.handler_cb = ble_svc_audio_bass_set_broadcast_code
+}, {
+.op_code = BLE_AUDIO_SVC_BASS_REMOVE_SOURCE,
+.expected_len = 1,
+.handler_cb = ble_svc_audio_bass_remove_source
+}
+};
+
+static int
+ble_svc_audio_bass_access(uint16_t conn_handle, uint16_t attr_handle,
+  struct ble_gatt_access_ctxt *ctxt, void *arg);
+
+static int
+ble_svc_audio_bass_ctrl_point_write_access(struct ble_gatt_access_ctxt *ctxt);
+static int
+ble_svc_audio_bass_rcv_state_read_access(struct ble_gatt_access_ctxt *ctxt, 
void *arg);
+
+static struct ble_gatt_chr_def 
ble_svc_audio_bass_chrs[MYNEWT_VAL(BLE_SVC_AUDIO_BASS_RECEIVE_STATE_MAX) + 2];
+
+static const struct ble_gatt_svc_def 
ble_svc_audio_bass_defs[MYNEWT_VAL(BLE_SVC_AUDIO_BASS_RECEIVE_STATE_MAX) + 2] = 
{
+{ /*** Service: Published A

[PR] nimble/drivers/native: Add missing function stubs [mynewt-nimble]

2024-02-21 Thread via GitHub


MariuszSkamra opened a new pull request, #1706:
URL: https://github.com/apache/mynewt-nimble/pull/1706

   This fixes unit test compilation error caused by missing 
ble_phy_tifs_txtx_set() and ble_phy_encrypt_header_mask_set() function stubs 
used by ble_ll_iso_big.c and ble_ll_isoal.c.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] apps/btshell: Fix print format specifier [mynewt-nimble]

2024-02-21 Thread via GitHub


MariuszSkamra opened a new pull request, #1707:
URL: https://github.com/apache/mynewt-nimble/pull/1707

   This fixes format specifer for printing CoC channel pointer.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] nimble/audio: Add LE Audio event listener and BASE parser [mynewt-nimble]

2024-02-21 Thread via GitHub


MariuszSkamra opened a new pull request, #1708:
URL: https://github.com/apache/mynewt-nimble/pull/1708

   This adds dedicated event listener for LE Audio events and BASE parser 
implementation along with unit tests.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] nimble/controller: Enable LL encryption if BLE_LL_ISO_BROADCASTER [mynewt-nimble]

2024-02-21 Thread via GitHub


MariuszSkamra commented on PR #1705:
URL: https://github.com/apache/mynewt-nimble/pull/1705#issuecomment-1956922795

   @andrzej-kaczmarek Please take a look


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



(mynewt-core) branch master updated: tinyusb/msc_fat_view: Fix custom entries support

2024-02-21 Thread jerzy
This is an automated email from the ASF dual-hosted git repository.

jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
 new e7186e725 tinyusb/msc_fat_view: Fix custom entries support
e7186e725 is described below

commit e7186e7256e53ce634f80fd9cc76d5cca7f81e2e
Author: Jerzy Kasenberg 
AuthorDate: Wed Feb 21 11:11:28 2024 +0100

tinyusb/msc_fat_view: Fix custom entries support

For now msc_fat_view provided several FAT root entries
that could be enabled in syscfg.

There is function to add new root dir entries msc_fat_view_add_dir_entry(),
however even if user added custom entry it would not show up since
all entries were refreshed when during test_unit_ready by call to
init_disk_data that silently dropped non standard entries and created
root from scratch.

Now root population is divided in to two functions.
init_disk_data() that provides standard enties is called when packaged is
initiated and update_disk_data() is called when actual sectors for host
are generated and this function includes user provided entries.

With this change core dump entries have to be initiated after 
msc_fat_view_pkg_init
and any time before tinyusb_start
---
 hw/usb/tinyusb/msc_fat_view/pkg.yml|  4 ++-
 hw/usb/tinyusb/msc_fat_view/src/msc_fat_view.c | 44 --
 2 files changed, 37 insertions(+), 11 deletions(-)

diff --git a/hw/usb/tinyusb/msc_fat_view/pkg.yml 
b/hw/usb/tinyusb/msc_fat_view/pkg.yml
index 441602712..16d5a538f 100644
--- a/hw/usb/tinyusb/msc_fat_view/pkg.yml
+++ b/hw/usb/tinyusb/msc_fat_view/pkg.yml
@@ -37,4 +37,6 @@ pkg.init.'(!BOOT_LOADER && TINYUSB_AUTO_START!=0)':
 msc_fat_view_pkg_init: $before:tinyusb_start
 
 pkg.init.'!BOOT_LOADER && MSC_FAT_VIEW_COREDUMP_FILES':
-msc_fat_view_coredump_pkg_init: $before:msc_fat_view_pkg_init
+msc_fat_view_coredump_pkg_init:
+- $after:msc_fat_view_pkg_init
+- $before:tinyusb_start
diff --git a/hw/usb/tinyusb/msc_fat_view/src/msc_fat_view.c 
b/hw/usb/tinyusb/msc_fat_view/src/msc_fat_view.c
index 8d73f69bf..52b095521 100644
--- a/hw/usb/tinyusb/msc_fat_view/src/msc_fat_view.c
+++ b/hw/usb/tinyusb/msc_fat_view/src/msc_fat_view.c
@@ -909,18 +909,29 @@ free_cluster_chain(cluster_t cluster)
 void
 msc_fat_view_add_dir_entry(const file_entry_t *file)
 {
-uint32_t file_size;
 int entry_ix = root_dir_entry_count++;
 
 root_dir[entry_ix].file = file;
 root_dir[entry_ix].dir_slots = fat_dir_entry_slots(file->name);
-root_dir[entry_ix].first_cluster = 0;
-file_size = file->size(file);
-if (file_size > 0) {
-root_dir[entry_ix].first_cluster = alloc_cluster_chain(0, 
cluster_count_from_bytes(file_size));
+MSC_FAT_VIEW_LOG_DEBUG("Added root entry %s\n", file->name);
+}
+
+void
+msc_fat_view_update_dir_entry(int entry_ix)
+{
+uint32_t file_size;
+const file_entry_t *file = root_dir[entry_ix].file;
+
+if (!root_dir[entry_ix].deleted) {
+root_dir[entry_ix].first_cluster = 0;
+file_size = file->size(file);
+if (file_size > 0) {
+root_dir[entry_ix].first_cluster = alloc_cluster_chain(0, 
cluster_count_from_bytes(file_size));
+}
+MSC_FAT_VIEW_LOG_DEBUG("Root file %s size %d, cluster %d (%d)\n", 
file->name, file_size,
+   root_dir[entry_ix].first_cluster,
+   cluster_count_from_bytes(file_size));
 }
-MSC_FAT_VIEW_LOG_DEBUG("%s size %d, cluster %d (%d)\n", file->name, 
file_size, root_dir[entry_ix].first_cluster,
-   cluster_count_from_bytes(file_size));
 }
 
 static dir_entry_t *
@@ -1561,8 +1572,6 @@ msc_fat_view_write_normal_sector(uint32_t sector, const 
uint8_t *buffer)
 static void
 init_disk_data(void)
 {
-free_clusters = (cluster_t)((SECTOR_COUNT - FAT_CLUSTER2_FIRST_SECTOR) / 
SECTORS_PER_CLUSTER);
-fat_chain_count = 0;
 root_dir_entry_count = 0;
 
 if (MYNEWT_VAL(MSC_FAT_VIEW_AUTOCONFIRM)) {
@@ -1594,11 +1603,25 @@ init_disk_data(void)
 if (MYNEWT_VAL(MSC_FAT_VIEW_COREDUMP_FILES)) {
 msc_fat_view_add_coredumps();
 }
+}
+
+static void
+update_disk_data(void)
+{
+int i;
+
+free_clusters = (cluster_t)((SECTOR_COUNT - FAT_CLUSTER2_FIRST_SECTOR) / 
SECTORS_PER_CLUSTER);
+fat_chain_count = 0;
+
 if (unallocated_write.write_status < 0) {
 write_status = unallocated_write.write_status;
 msc_fat_view_add_dir_entry(&flash_result);
 }
 unallocated_write.write_status = NOT_TOUCHED_YET;
+
+for (i = 0; i < root_dir_entry_count; ++i) {
+msc_fat_view_update_dir_entry(i);
+}
 }
 
 /*
@@ -1635,7 +1658,7 @@ tud_msc_test_unit_ready_cb(uint8_t lun)
 if (medium_state == MEDIUM_RELOAD) {
 /* This path will report medium not present */
 medium_state = REPO

Re: [PR] tinyusb/msc_fat_view: Fix custom entries support [mynewt-core]

2024-02-21 Thread via GitHub


kasjer merged PR #3148:
URL: https://github.com/apache/mynewt-core/pull/3148


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] nimble/host: Zero initialize buffer after allocation [mynewt-nimble]

2024-02-21 Thread via GitHub


rahult-github commented on PR #1687:
URL: https://github.com/apache/mynewt-nimble/pull/1687#issuecomment-1958712231

   @andrzej-kaczmarek , @sjanc  , please take a look


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] nimble/host: Add API to allow given address from whitelist [mynewt-nimble]

2024-02-21 Thread via GitHub


rahult-github closed pull request #1685: nimble/host: Add API to allow given 
address from whitelist
URL: https://github.com/apache/mynewt-nimble/pull/1685


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] nimble/host: Add API to allow given address from whitelist [mynewt-nimble]

2024-02-21 Thread via GitHub


rahult-github commented on PR #1685:
URL: https://github.com/apache/mynewt-nimble/pull/1685#issuecomment-1958712721

   @andrzej-kaczmarek  , ok . Thanks for explaining the architecture design. 
Closing the PR


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org