This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

关于IAR的宏定义问题

想定义一个宏,为什么要按照如下方式定义呢

(1)     #define HAL_IO_SET(port, pin, val) HAL_IO_SET_PREP(port, pin, val)
(2)     #define HAL_IO_SET_PREP(port, pin, val) st( P##port##_##pin## = val; )

单独使用(2)为什么会报错呢