fix warning: #1296

When compiling C code containing statements like this:
rt_base_t xx_io_tbl[] =
{
   GET_PIN(A,0),
};
the compiler will report:
Warning: #1296-D: extended constant initialiser used
This commit is contained in:
yygg_you 2019-10-10 11:06:21 +08:00
parent 6aa07774bb
commit 361ee3da97
1 changed files with 2 additions and 2 deletions

View File

@ -14,9 +14,9 @@
#include <drv_common.h>
#include <board.h>
#define __STM32_PORT(port) GPIO##port
#define __STM32_PORT(port) GPIO##port##_BASE
#define GET_PIN(PORTx,PIN) (rt_base_t)((16 * ( ((rt_base_t)__STM32_PORT(PORTx) - (rt_base_t)GPIOA)/(0x0400UL) )) + PIN)
#define GET_PIN(PORTx,PIN) (rt_base_t)((16 * ( ((rt_base_t)__STM32_PORT(PORTx) - (rt_base_t)GPIOA_BASE)/(0x0400UL) )) + PIN)
#define __STM32_PIN(index, gpio, gpio_index) \
{ \