]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/blobdiff - rpp/include/rpp/rpp.h
Make the RPP layer thread safe
[pes-rpp/rpp-lib.git] / rpp / include / rpp / rpp.h
index 5d5407d66493ae16e49afbbe129804612a4b217e..824d52a7750d6a81d81f96e25b4cee1067f80754 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 */
-#ifdef __RPP_CONFIG_OVERRIDE
-#include "RppConfig.h"
-#else
-#include "rpp/RppConfig.h"
-#endif
+#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"
+#elif defined(TARGET_RM48_HDK)
+#include "rpp/adc.h"
+#include "rpp/can.h"
+#include "rpp/sci.h"
+#include "rpp/gio.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"
+#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
+#include "rpp/lout.h"
+#include "rpp/mout.h"
 #include "rpp/sci.h"
-#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/sdr.h"
-#endif
-
+#else /* if defined(TARGET_POSIX) */
+#error No supported target specified!
+#endif /* TARGET_TMS570_HDK */
 
 /* 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 */