mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-19 11:33:51 +01:00
27 lines
1.1 KiB
Diff
27 lines
1.1 KiB
Diff
From 747d003d74b88b64e721e3fe9512ca2ffeaa02ee Mon Sep 17 00:00:00 2001
|
|
From: Gunar Schorcht <gunar@schorcht.net>
|
|
Date: Mon, 31 Mar 2025 09:07:03 +0200
|
|
Subject: [PATCH 32/33] hal/esp32h2/gspi_flash_ll: fix signed/unsigned
|
|
comparison
|
|
|
|
---
|
|
components/hal/esp32h2/include/hal/gpspi_flash_ll.h | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/components/hal/esp32h2/include/hal/gpspi_flash_ll.h b/components/hal/esp32h2/include/hal/gpspi_flash_ll.h
|
|
index 124863b7d6..4d6a5fede7 100644
|
|
--- a/components/hal/esp32h2/include/hal/gpspi_flash_ll.h
|
|
+++ b/components/hal/esp32h2/include/hal/gpspi_flash_ll.h
|
|
@@ -85,7 +85,7 @@ static inline void gpspi_flash_ll_get_buffer_data(spi_dev_t *dev, void *buffer,
|
|
} else {
|
|
// Otherwise, slow(er) path copies word by word
|
|
int copy_len = read_len;
|
|
- for (int i = 0; i < (read_len + 3) / 4; i++) {
|
|
+ for (uint32_t i = 0; i < (read_len + 3) / 4; i++) {
|
|
int word_len = MIN(sizeof(uint32_t), copy_len);
|
|
uint32_t word = dev->data_buf[i].buf0;
|
|
memcpy(buffer, &word, word_len);
|
|
--
|
|
2.34.1
|
|
|