c, macro with 2 arguments issue -
#define led 3,3 #define gpiohigh(port,pin) (lpc_gpio ## port->masked_access[(1<< pin)] = (1<< pin)) #define gpiolow(port,pin) (lpc_gpio ## port->masked_access[(1<< pin)] = 0) #define led_on() gpiohigh(led) #define led_off() gpiolow(led)
is not working, complaining gpiohigh()
, low()
needs 2 arguments. there magic trick out there?
"led" 3,3 interpreted single argument. complaining missing argument. macro substitutions not literal substitution of 1 another.
Comments
Post a Comment