1
0
Fork 0

Completely disable CO_gateway_ascii module if not enabled by config

When CO_CONFIG_GTW_ASCII is not enabled in configuration, this module
produces multiple important warnings, like 2 warnings about implicit
function declaration. Instead of making the source more complex and
fixing each warning individually, in this case it is much easier to just
completely disable compilation of the whole thing.
This commit is contained in:
Freddie Chopin 2020-06-26 12:35:46 +02:00
parent 3fbaec1d5e
commit 3cf4f62109
2 changed files with 8 additions and 0 deletions

View file

@ -32,6 +32,7 @@
#include "309/CO_gateway_ascii.h"
#if (CO_CONFIG_GTW) & CO_CONFIG_GTW_ASCII
/******************************************************************************/
CO_ReturnError_t CO_GTWA_init(CO_GTWA_t* gtwa,
@ -1961,3 +1962,5 @@ void CO_GTWA_process(CO_GTWA_t *gtwa,
}
}
#endif /* (CO_CONFIG_GTW) & CO_CONFIG_GTW_ASCII */

View file

@ -29,6 +29,9 @@
#define CO_GATEWAY_ASCII_H
#include "301/CO_driver.h"
#if (CO_CONFIG_GTW) & CO_CONFIG_GTW_ASCII
#include "301/CO_fifo.h"
#if (CO_CONFIG_GTW) & CO_CONFIG_GTW_ASCII_SDO
#include "301/CO_SDOserver.h"
@ -526,5 +529,7 @@ void CO_GTWA_process(CO_GTWA_t *gtwa,
}
#endif /*__cplusplus*/
#endif /* (CO_CONFIG_GTW) & CO_CONFIG_GTW_ASCII */
/** @} */
#endif /* CO_GATEWAY_ASCII_H */