]> granicus.if.org Git - esp-idf/commitdiff
fix bug that uart register base address macro was wrong
authorJack <jack@espressif.com>
Fri, 23 Jun 2017 11:56:12 +0000 (19:56 +0800)
committerJack <jack@espressif.com>
Fri, 23 Jun 2017 11:56:12 +0000 (19:56 +0800)
components/soc/esp32/include/soc/uart_reg.h

index df614a88db18977cddbce4db22fd183716a5aab7..9d5ba2fb19059fcb57171d8eb11c6c01fc73df56 100644 (file)
@@ -17,8 +17,8 @@
 
 #include "soc.h"
 
-#define REG_UART_BASE( i )  (DR_REG_UART_BASE + (i) * 0x10000 + ( i > 1 ? 0xe000 : 0 ) )
-#define REG_UART_AHB_BASE(i)  (0x60000000 + (i) * 0x10000 + ( i > 1 ? 0xe000 : 0 ) )
+#define REG_UART_BASE( i )  (DR_REG_UART_BASE + (i) * 0x10000 + ( (i) > 1 ? 0xe000 : 0 ) )
+#define REG_UART_AHB_BASE(i)  (0x60000000 + (i) * 0x10000 + ( (i) > 1 ? 0xe000 : 0 ) )
 #define UART_FIFO_AHB_REG(i)  (REG_UART_AHB_BASE(i) + 0x0)
 #define UART_FIFO_REG(i)          (REG_UART_BASE(i) + 0x0)