From a002c3a9ad123aaf12541d9f737d3c536ce415c5 Mon Sep 17 00:00:00 2001
From: Roman Kretschmer <roman@kretschmer.email>
Date: Sat, 10 Jun 2023 23:38:33 +0200
Subject: [PATCH] Fix SPI Direction

Value was shifted 4 bits to the right
---
 ch32v003fun/ch32v003fun.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ch32v003fun/ch32v003fun.h b/ch32v003fun/ch32v003fun.h
index 1634bcb..694a4b3 100644
--- a/ch32v003fun/ch32v003fun.h
+++ b/ch32v003fun/ch32v003fun.h
@@ -3875,7 +3875,7 @@ typedef struct
 
 /* SPI_data_direction */
 #define SPI_Direction_2Lines_FullDuplex    ((uint16_t)0x0000)
-#define SPI_Direction_2Lines_RxOnly        ((uint16_t)0x0400)
+#define SPI_Direction_2Lines_RxOnly        ((uint16_t)0x4000)
 #define SPI_Direction_1Line_Rx             ((uint16_t)0x8000)
 #define SPI_Direction_1Line_Tx             ((uint16_t)0xC000)
 
-- 
GitLab