From 31d2417fdf090c39c6aca62a7d345ca92364ad6e Mon Sep 17 00:00:00 2001
From: recallmenot <edmund.raile@proton.me>
Date: Wed, 21 Jun 2023 07:32:35 +0200
Subject: [PATCH] GPIO analogwrite removed extraneous braces

---
 extralibs/ch32v003_GPIO_branchless.h | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/extralibs/ch32v003_GPIO_branchless.h b/extralibs/ch32v003_GPIO_branchless.h
index 728ee00..6216ebc 100644
--- a/extralibs/ch32v003_GPIO_branchless.h
+++ b/extralibs/ch32v003_GPIO_branchless.h
@@ -462,15 +462,11 @@ static inline void GPIO_tim2_init() {
 	TIM2->CCER |= (TIM_OutputState_Enable ) << (4 * (channel - 1));		\
 })
 
-#define GPIO_timer_CVR(channel)		CONCAT_INDIRECT(CH, CONCAT_INDIRECT(channel, CVR))
+#define GPIO_timer_CVR(channel)				CONCAT_INDIRECT(CH, CONCAT_INDIRECT(channel, CVR))
 
 #undef GPIO_tim1_analogWrite
-#define GPIO_tim1_analogWrite(channel, value) ({				\
-	TIM1->GPIO_timer_CVR(channel) = value;					\
-})
+#define GPIO_tim1_analogWrite(channel, value) 		TIM1->GPIO_timer_CVR(channel) = value;
 #undef GPIO_tim2_analogWrite
-#define GPIO_tim2_analogWrite(channel, value) ({				\
-	TIM2->GPIO_timer_CVR(channel) = value;					\
-})
+#define GPIO_tim2_analogWrite(channel, value)		TIM2->GPIO_timer_CVR(channel) = value;
 
 #endif // CH32V003_GPIO_BR_H
-- 
GitLab