I defined this macro:
#define DEF_CONCAT(a, b) a ## b
#define _internal_RCC(gpio, io) DEF_CONCAT(RCC_GPIO, gpio)
#define _internal_IO(gpio, io) DEF_CONCAT(GPIO, io)
#define IO_CFG_OUTPUT(gpio) {rcc_periph_clock_enable(_internal_RCC(gpio));gpio_set_mode(gpio, GPIO_MODE_OUTPUT_50_MHZ, GPIO_CNF_OUTPUT_PUSHPULL, _internal_IO(gpio));}
And I want to call this with:
IO_CFG_OUTPUT(LED_STATE);
LED_STATE
is defined as: #define LED_STATE C,12
But when I run my program, the compiler tells me:
In file included from inc/Robot.hpp:6:0,
from src/Robot.cpp:1:
src/Robot.cpp: In member function 'void Robot::setup()':
inc/IODefines.hpp:13:19: error: 'C' was not declared in this scope
#define LED_STATE C,12
^
What did I do wrong?