// PRQA S 881 EOF // PRQA S 3411 EOF // NOTE: Do not implement any file guard. // This file will be multiply included for the macro table generations. //***************************************************************************** // (C) Automotive Lighting Reutlingen GmbH // Tuebinger Strasse 123, 72762 Reutlingen, Germany // // Automotive Lighting Reutlingen GmbH owns all the rights to this work. // This work shall not be copied, reproduced, used, modified, transferred // or its information shall not be disclosed without the prior written // authorization of Automotive Lighting Reutlingen GmbH. //***************************************************************************** //----------------------------------------------------------------------------- /// \file ComBufMac.h /// /// \brief Alx1 - Generic operating system in C. Command scheduler macros. /// /// \descr Preprocessor macros for the task enum list and task RAM and ROM array list. /// /// \author Ramona-Andreea Bolboaca (f33613c) /// mailTo:ramona-andreea.bolboaca(at)magnetimarelli.com //----------------------------------------------------------------------------- // ***************************************************************************** // Macros // ***************************************************************************** #ifdef BEGIN_COMBUF_HANDLE_DEF #undef BEGIN_COMBUF_HANDLE_DEF #endif #ifdef END_COMBUF_HANDLE_DEF #undef END_COMBUF_HANDLE_DEF #endif #ifdef COMBUF_HANDLE #undef COMBUF_HANDLE #endif #ifdef BEGIN_COMBUF_LIST_MAP #undef BEGIN_COMBUF_LIST_MAP #endif #ifdef COMBUF_CFG #undef COMBUF_CFG #endif #ifdef END_COMBUF_LIST_MAP #undef END_COMBUF_LIST_MAP #endif #if defined(COMBUF_MAC_DECL_ENUM) #define BEGIN_COMBUF_HANDLE_DEF \ typedef enum enum_combuf_handle_type { #define COMBUF_HANDLE(handle) \ handle, #define END_COMBUF_HANDLE_DEF \ COMBUF_HANDLE_COUNT \ } combuf_handle_type; #else #define BEGIN_COMBUF_HANDLE_DEF #define COMBUF_HANDLE(handle) #define END_COMBUF_HANDLE_DEF #endif #undef BEGIN_COMBUF_LIST_MAP #undef COMBUF_CFG #undef END_COMBUF_LIST_MAP #if defined(MAC_COMBUF_MAKE_TX_BUFFER) #define BEGIN_COMBUF_LIST_MAP() #define COMBUF_CFG(NAME, SIZE_TX, SIZE_RX) uint8_t txBuffer_##NAME[SIZE_TX]; #define END_COMBUF_LIST_MAP() #elif defined(MAC_COMBUF_MAKE_RX_BUFFER) #define BEGIN_COMBUF_LIST_MAP() #define COMBUF_CFG(NAME, SIZE_TX, SIZE_RX) uint8_t rxBuffer_##NAME[SIZE_RX]; #define END_COMBUF_LIST_MAP() #elif defined(MAC_COMBUF_CREATE_BUFFER_LIST) #define BEGIN_COMBUF_LIST_MAP() tComBuf comBuf[COMBUF_HANDLE_COUNT] = { #define COMBUF_CFG(NAME, SIZE_TX, SIZE_RX) {FALSE, {txBuffer_##NAME, SIZE_TX}, SIZE_TX, NO_CONCURRENT_REQUEST, {rxBuffer_##NAME, SIZE_RX}, SIZE_RX, NO_CONCURRENT_REQUEST}, #define END_COMBUF_LIST_MAP() } ; #else #define BEGIN_COMBUF_LIST_MAP() #define COMBUF_CFG(NAME, SIZE_TX, SIZE_RX) #define END_COMBUF_LIST_MAP() #endif