X-Git-Url: http://rtime.felk.cvut.cz/gitweb/pes-rpp/rpp-lib.git/blobdiff_plain/91b89355c2e451b7471d62f414f5bc04df951036..e2de98fb408f44c31238c2ef95dbac5cc036de86:/rpp/include/rpp/rpp.h diff --git a/rpp/include/rpp/rpp.h b/rpp/include/rpp/rpp.h index 016f5c9..ac36dba 100644 --- a/rpp/include/rpp/rpp.h +++ b/rpp/include/rpp/rpp.h @@ -3,7 +3,7 @@ * * @file rpp.h * - * @copyright Copyright (C) 2013 Czech Technical University in Prague + * @copyright Copyright (C) 2013, 2014, 2015 Czech Technical University in Prague * * @author Carlos Jenkins */ @@ -15,88 +15,64 @@ /* Base includes */ #include "base.h" -/* Include configuration */ -#include "rpp/RppConfig.h" +#include "rpp/mutex.h" /* Include modules */ -#if rppCONFIG_INCLUDE_DIN == 1 +#if defined(TARGET_POSIX) +#include "rpp/adc.h" +#include "rpp/can.h" +#include "rpp/sci.h" +#include "rpp/sci_posix.h" +#include "rpp/eth.h" +#elif defined(TARGET_RM48_HDK) +#include "rpp/adc.h" +#include "rpp/can.h" +#include "rpp/sci.h" +#include "rpp/gio.h" +#include "rpp/eth.h" +#elif defined(TARGET_TMS570_HDK) || defined(TARGET_TMS570_HYDCTR) +#include "rpp/adc.h" +#include "rpp/can.h" +#include "rpp/sci.h" +#include "rpp/gio.h" +#include "rpp/eth.h" +#elif defined(TARGET_TMS570_RPP) +#include "rpp/adc.h" +#include "rpp/can.h" +#include "rpp/dac.h" #include "rpp/din.h" -#endif - -#if rppCONFIG_INCLUDE_LOUT == 1 -#include "rpp/lout.h" -#endif - -#if rppCONFIG_INCLUDE_AIN == 1 -#include "rpp/ain.h" -#endif - -#if rppCONFIG_INCLUDE_AOUT == 1 -#include "rpp/aout.h" -#endif - -#if rppCONFIG_INCLUDE_HBR == 1 +#include "rpp/eth.h" +#include "rpp/fr.h" +#include "rpp/gio.h" #include "rpp/hbr.h" -#endif - -#if rppCONFIG_INCLUDE_MOUT == 1 -#include "rpp/mout.h" -#endif - -#if rppCONFIG_INCLUDE_HOUT == 1 #include "rpp/hout.h" -#endif - -#if rppCONFIG_INCLUDE_CAN == 1 -#include "rpp/can.h" -#endif - -#if rppCONFIG_INCLUDE_LIN == 1 +#include "rpp/irc.h" #include "rpp/lin.h" -#endif - -#if rppCONFIG_INCLUDE_FR == 1 -#include "rpp/fr.h" -#endif - -#if rppCONFIG_INCLUDE_SCI == 1 - #ifdef FREERTOS_POSIX - #if rppCONFIG_DRV == 1 - #error "Your build system is broken. "\ - "You are trying to compile the RPP API against POSIX "\ - "FreeRTOS for Simulation with dependency on the ARM-only "\ - "DRV layer enabled." - #endif - - #include "rpp/sci_posix.h" - #else - #include "rpp/sci.h" - #endif -#endif - -#if rppCONFIG_INCLUDE_ETH == 1 -#include "rpp/eth.h" -#endif - -#if rppCONFIG_INCLUDE_SDC == 1 -#include "rpp/sdc.h" -#endif - -#if rppCONFIG_INCLUDE_SDR == 1 +#include "rpp/lout.h" +#include "rpp/mout.h" +#include "rpp/sci.h" #include "rpp/sdr.h" -#endif +#else /* if defined(TARGET_POSIX) */ +#error No supported target specified! +#endif /* TARGET_TMS570_HDK */ +#if defined(TARGET_HAS_SPI) +#include "rpp/spi.h" +#endif /* Library main functions */ /** * Library initialization function. - * Call this method before using this library. * - * @return SUCCESS if initialization successful. + * This is a convenience function, that initializes all peripherals. + * If the application does not use all the peripherals it is better to + * call directly the rpp__init() functions for the used + * peripherals as the resulting binary will be smaller. + * + * @return SUCCESS if initialization successful.\n * FAILURE is library was already initialized. */ int8_t rpp_init(); - #endif /* __RPP_RPP_H */