#ifndef _arena_CONFIG_DEFINES_H_
#define _arena_CONFIG_DEFINES_H_
//----------------------------------------------------------------------------
///
/// \file   config_defines.h
///
/// \brief  See implementation for further implementation
///
/// \date   20160316
/// \author Maximilian Seesslen <mes@seesslen.net>
///
//----------------------------------------------------------------------------


//---Includes-----------------------------------------------------------------


//#define board_header(arena_board_header) <arena/boards/arena_board_header.h>
//#define app_header(arena_app_header) <arena/apps/arena_app_header.h>

//#define board_header(arena_board,arena_app) <arena_board/arena_app_ arena_app.h>
//#define app_header(arena_board,arena_app) <arena_board/arena_app_ arena_app.h>

//#define board_header(arena_board,arena_app) <arena_app_ arena_app.h>
#define app_header(arena_board,arena_app) <arena_app_ arena_app.h>

#define compose_enum_helper(ce_helper_1,ce_helper_2) ce_helper_1##ce_helper_2
#define compose_enum(ce1,ce2) compose_enum_helper( ce1 , ce2 )
#define compose_enum2(ce1,ce2) compose_enum(ce1,ce2)
#define compose_enum3(ce1,ce2) compose_enum2(ce1,ce2)


#ifdef ARENA_APP
   #if defined( ARENA_APP_full )
      #include <arena/apps/full.h>
   #elif defined( ARENA_APP_minimal )
      #include <arena/apps/minimal.h>
   #elif defined( ARENA_APP_spi )
      #include <arena/apps/spi.h>
   #elif defined( ARENA_APP_irclock )
      #include <arena/apps/irclock.h>
   //#elif defined( ARENA_APP_temprec )
   //   #include <arena/apps/temprec.h>
   #elif defined( ARENA_APP_qt )
      #include <arena/apps/qt.h>
   #elif defined( ARENA_APP_canbridge )
      #include <st_nucleo_f303/canbridge.h>
   #elif defined( ARENA_APP_aclock )
      #include <arena/apps/aclock.h>
   #elif defined( ARENA_APP_tsc )
      #include <st_discovery_f072/tsc.h>
   #else
      #include app_header(ARENA_BOARD,ARENA_APP)
      //#print ARENA_BOARD
   #endif
#endif

// The statement "#include board_header(arena_BOARD)" does work
// but: QTCreator cant handle it of course. We need the help of QTCreator.
#if defined ( ARENA_BOARD_steifomat )
   #include <arena/boards/steifomat.h>
#elif defined ( ARENA_BOARD_steifomat_trivial )
   #include <arena/boards/steifomat_trivial.h>
#elif defined ( ARENA_BOARD_mcpprog )
   #include <arena/boards/mcpprog.h>
#elif defined ( ARENA_BOARD_canbridge )
   #include <st_nucleo_f303/canbridge.h>
#elif defined ( ARENA_BOARD_irclock )
   #include <arena/boards/irclock.h>
#elif defined ( ARENA_BOARD_master )
   #include <arena/boards/master.h>
#elif defined ( ARENA_BOARD_st_nucleo_f1 )
   #include <arena/boards/st_nucleo_f1.h>
#elif defined ( ARENA_BOARD_qt1 )
   #include <boards/qt1.h>
#elif defined ( ARENA_BOARD_st_discovery_f4 )
   //#include <arena/boards/st_discovery_f4.h>
#elif defined ( ARENA_BOARD_st_discovery_l100 )
   #include <arena/boards/st_discovery_l100.h>
#elif defined ( ARENA_BOARD_st_nucleo_f3 )
   #include <arena/boards/st_nucleo_f303.h>
#elif defined ( ARENA_BOARD_st_nucleo_f0 )
   // #include <arena/boards/st_nucleo_f0.h>
#elif defined ( ARENA_BOARD_bigmaster )
   #include <arena/boards/bigmaster.h>
#elif defined ( ARENA_BOARD_temprec )
   #include <arena/boards/temprec.h>
#elif defined ( ARENA_BOARD_qt )
   //#include <arena/boards/qt.h>
#else
   #ifdef ARENA_BOARD
      //#include board_header(ARENA_BOARD,ARENA_APP)
   #endif
#endif


//#include <arena/supplements.h>

#define ARENA_LED_NAMES \
            compose_enum(eLedIndex, ARENA_LED_0_NAME), \
            compose_enum(eLedIndex, ARENA_LED_1_NAME), \
            compose_enum(eLedIndex, ARENA_LED_2_NAME), \
            compose_enum(eLedIndex, ARENA_LED_3_NAME), \
            compose_enum(eLedIndex, ARENA_LED_4_NAME), \
            compose_enum(eLedIndex, ARENA_LED_5_NAME),


//---fin----------------------------------------------------------------------
#endif // ? ! _ARENA_CONFIG_H_
