summaryrefslogtreecommitdiff
path: root/drivers/chibios/serial_usart.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/chibios/serial_usart.h')
-rw-r--r--drivers/chibios/serial_usart.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/chibios/serial_usart.h b/drivers/chibios/serial_usart.h
index d35b5d12c6..fee7b4d159 100644
--- a/drivers/chibios/serial_usart.h
+++ b/drivers/chibios/serial_usart.h
@@ -40,13 +40,25 @@
#endif
#if defined(USART1_REMAP)
-# define USART_REMAP do { (AFIO->MAPR |= AFIO_MAPR_USART1_REMAP); } while(0)
+# define USART_REMAP \
+ do { \
+ (AFIO->MAPR |= AFIO_MAPR_USART1_REMAP); \
+ } while (0)
#elif defined(USART2_REMAP)
-# define USART_REMAP do { (AFIO->MAPR |= AFIO_MAPR_USART2_REMAP); } while(0)
+# define USART_REMAP \
+ do { \
+ (AFIO->MAPR |= AFIO_MAPR_USART2_REMAP); \
+ } while (0)
#elif defined(USART3_PARTIALREMAP)
-# define USART_REMAP do { (AFIO->MAPR |= AFIO_MAPR_USART3_REMAP_PARTIALREMAP); } while(0)
+# define USART_REMAP \
+ do { \
+ (AFIO->MAPR |= AFIO_MAPR_USART3_REMAP_PARTIALREMAP); \
+ } while (0)
#elif defined(USART3_FULLREMAP)
-# define USART_REMAP do { (AFIO->MAPR |= AFIO_MAPR_USART3_REMAP_FULLREMAP); } while(0)
+# define USART_REMAP \
+ do { \
+ (AFIO->MAPR |= AFIO_MAPR_USART3_REMAP_FULLREMAP); \
+ } while (0)
#endif
#ifndef SELECT_SOFT_SERIAL_SPEED