diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2013-04-06 22:07:54 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2013-04-06 22:07:54 +0000 |
commit | 7c3867da33250e5a20d26f64c5a127323c2094cc (patch) | |
tree | 6c0bc8892eaf7d7767e20bb1d2296389fd13b959 /LUFA/Drivers/Board/AVR8 | |
parent | 7dc77a6abc7f3a86970ca48d355b55ed5931a350 (diff) | |
download | lufa-7c3867da33250e5a20d26f64c5a127323c2094cc.tar.gz lufa-7c3867da33250e5a20d26f64c5a127323c2094cc.tar.bz2 lufa-7c3867da33250e5a20d26f64c5a127323c2094cc.zip |
Added new CONCAT() and CONCAT_EXPANDED() convenience macros.
Diffstat (limited to 'LUFA/Drivers/Board/AVR8')
-rw-r--r-- | LUFA/Drivers/Board/AVR8/MICROPENDOUS/Buttons.h | 15 | ||||
-rw-r--r-- | LUFA/Drivers/Board/AVR8/MICROPENDOUS/LEDs.h | 9 |
2 files changed, 9 insertions, 15 deletions
diff --git a/LUFA/Drivers/Board/AVR8/MICROPENDOUS/Buttons.h b/LUFA/Drivers/Board/AVR8/MICROPENDOUS/Buttons.h index d2dec8350..602c16f62 100644 --- a/LUFA/Drivers/Board/AVR8/MICROPENDOUS/Buttons.h +++ b/LUFA/Drivers/Board/AVR8/MICROPENDOUS/Buttons.h @@ -56,14 +56,14 @@ * * See \ref Group_Buttons_MICROPENDOUS_32U2 for more details. */ - + /** \ingroup Group_Buttons * \defgroup Group_Buttons_MICROPENDOUS_3 MICROPENDOUS_3 * \brief Board specific Button driver header for the Micropendous 3 (https://code.google.com/p/micropendous/wiki/Micropendous3). * * See \ref Group_Buttons_MICROPENDOUS_32U2 for more details. */ - + /** \ingroup Group_Buttons * \defgroup Group_Buttons_MICROPENDOUS_4 MICROPENDOUS_4 * \brief Board specific Button driver header for the Micropendous 4 (https://code.google.com/p/micropendous/wiki/Micropendous4). @@ -161,19 +161,16 @@ #define _BOARD_BUTTON1_MASK (1 << 2) #define _BOARD_BUTTON_PORTLETTER E #endif - - #define _BOARD_BUTTON_CONCAT2(Reg, Letter) Reg ## Letter - #define _BOARD_BUTTON_CONCAT(Reg, Letter) _BOARD_BUTTON_CONCAT2(Reg, Letter) - #define _BOARD_BUTTON_PORT _BOARD_BUTTON_CONCAT(PORT, _BOARD_BUTTON_PORTLETTER) - #define _BOARD_BUTTON_PIN _BOARD_BUTTON_CONCAT(PIN, _BOARD_BUTTON_PORTLETTER) - #define _BOARD_BUTTON_DDR _BOARD_BUTTON_CONCAT(DDR, _BOARD_BUTTON_PORTLETTER) + #define _BOARD_BUTTON_PORT CONCAT_EXPANDED(PORT, _BOARD_BUTTON_PORTLETTER) + #define _BOARD_BUTTON_PIN CONCAT_EXPANDED(PIN, _BOARD_BUTTON_PORTLETTER) + #define _BOARD_BUTTON_DDR CONCAT_EXPANDED(DDR, _BOARD_BUTTON_PORTLETTER) #endif /* Public Interface - May be used in end-application: */ /* Macros: */ /** Button mask for the first button on the board. */ - #define BUTTONS_BUTTON1 _BOARD_BUTTON1_MASK + #define BUTTONS_BUTTON1 _BOARD_BUTTON1_MASK /* Inline Functions: */ #if !defined(__DOXYGEN__) diff --git a/LUFA/Drivers/Board/AVR8/MICROPENDOUS/LEDs.h b/LUFA/Drivers/Board/AVR8/MICROPENDOUS/LEDs.h index d87817fa9..53311bd50 100644 --- a/LUFA/Drivers/Board/AVR8/MICROPENDOUS/LEDs.h +++ b/LUFA/Drivers/Board/AVR8/MICROPENDOUS/LEDs.h @@ -100,12 +100,9 @@ #define _BOARD_LED_PORTLETTER B #endif - #define _BOARD_LED_CONCAT2(Reg, Letter) Reg ## Letter - #define _BOARD_LED_CONCAT(Reg, Letter) _BOARD_LED_CONCAT2(Reg, Letter) - - #define _BOARD_LED_PORT _BOARD_LED_CONCAT(PORT, _BOARD_LED_PORTLETTER) - #define _BOARD_LED_PIN _BOARD_LED_CONCAT(PIN, _BOARD_LED_PORTLETTER) - #define _BOARD_LED_DDR _BOARD_LED_CONCAT(DDR, _BOARD_LED_PORTLETTER) + #define _BOARD_LED_PORT CONCAT_EXPANDED(PORT, _BOARD_LED_PORTLETTER) + #define _BOARD_LED_PIN CONCAT_EXPANDED(PIN, _BOARD_LED_PORTLETTER) + #define _BOARD_LED_DDR CONCAT_EXPANDED(DDR, _BOARD_LED_PORTLETTER) #endif /* Public Interface - May be used in end-application: */ |