From: Jack Date: Fri, 23 Jun 2017 11:56:12 +0000 (+0800) Subject: fix bug that uart register base address macro was wrong X-Git-Tag: v3.0-dev~6^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ab9f63aba79c6d471c4dac8f07ddcc9b9c95aa6e;p=esp-idf fix bug that uart register base address macro was wrong --- diff --git a/components/soc/esp32/include/soc/uart_reg.h b/components/soc/esp32/include/soc/uart_reg.h index df614a88db..9d5ba2fb19 100644 --- a/components/soc/esp32/include/soc/uart_reg.h +++ b/components/soc/esp32/include/soc/uart_reg.h @@ -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)