]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/blobdiff - rpp/include/rpp/rpp.h
Enable ehternet for all platform
[pes-rpp/rpp-lib.git] / rpp / include / rpp / rpp.h
index 016f5c93dbd3db6abbf0c39c5cf43a4e2f416511..ac36dba93da7b5e1b4118322613812396599fab0 100644 (file)
@@ -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 <carlos@jenkins.co.cr>
  */
 /* 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_<periph>_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 */