mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
001ddc6a1e
fixup! pkg/esp32_sdk: additional patches required for ESP32-C3
35 lines
1.4 KiB
Diff
35 lines
1.4 KiB
Diff
From 367e4268b81a30c243628f8c99e94550bd291ec0 Mon Sep 17 00:00:00 2001
|
|
From: Gunar Schorcht <gunar@schorcht.net>
|
|
Date: Thu, 10 Mar 2022 12:39:51 +0100
|
|
Subject: [PATCH 19/20] hal: fix spi_ll compilation errors for riscv32
|
|
|
|
---
|
|
components/hal/esp32c3/include/hal/spi_ll.h | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/components/hal/esp32c3/include/hal/spi_ll.h b/components/hal/esp32c3/include/hal/spi_ll.h
|
|
index 38e1676d041..a9154c4600a 100644
|
|
--- a/components/hal/esp32c3/include/hal/spi_ll.h
|
|
+++ b/components/hal/esp32c3/include/hal/spi_ll.h
|
|
@@ -332,7 +332,7 @@ static inline void spi_ll_dma_set_rx_eof_generation(spi_dev_t *hw, bool enable)
|
|
*/
|
|
static inline void spi_ll_write_buffer(spi_dev_t *hw, const uint8_t *buffer_to_send, size_t bitlen)
|
|
{
|
|
- for (int x = 0; x < bitlen; x += 32) {
|
|
+ for (size_t x = 0; x < bitlen; x += 32) {
|
|
//Use memcpy to get around alignment issues for txdata
|
|
uint32_t word;
|
|
memcpy(&word, &buffer_to_send[x / 8], 4);
|
|
@@ -384,7 +384,7 @@ static inline void spi_ll_write_buffer_byte(spi_dev_t *hw, int byte_id, uint8_t
|
|
*/
|
|
static inline void spi_ll_read_buffer(spi_dev_t *hw, uint8_t *buffer_to_rcv, size_t bitlen)
|
|
{
|
|
- for (int x = 0; x < bitlen; x += 32) {
|
|
+ for (size_t x = 0; x < bitlen; x += 32) {
|
|
//Do a memcpy to get around possible alignment issues in rx_buffer
|
|
uint32_t word = hw->data_buf[x / 32];
|
|
int len = bitlen - x;
|
|
--
|
|
2.17.1
|
|
|