]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/blobdiff - rpp/include/rpp/rpp.h
Uncrustify
[pes-rpp/rpp-lib.git] / rpp / include / rpp / rpp.h
index 9211588a46bb1f0fc20e61f36621c9fbb8ce7064..37ae7a9ba48ea15f689b9966d19b3de75403cb9c 100644 (file)
@@ -3,7 +3,7 @@
  *
  * @file rpp.h
  *
- * @copyright Copyright (C) 2013, 2014 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 modules */
-#include "rpp/din.h"
-#include "rpp/lout.h"
+#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"
+#include "rpp/eth.h"
+#include "rpp/fr.h"
+#include "rpp/gio.h"
 #include "rpp/hbr.h"
-#include "rpp/mout.h"
 #include "rpp/hout.h"
-#include "rpp/can.h"
+#include "rpp/irc.h"
 #include "rpp/lin.h"
-#if rppPOSIX_VERSION == 0
-       #include "rpp/eth.h"
-       #include "rpp/fr.h"
-#endif
+#include "rpp/lout.h"
+#include "rpp/mout.h"
 #include "rpp/sci.h"
+#include "rpp/sdr.h"
+#else /* if defined(TARGET_POSIX) */
+#error No supported target specified!
+#endif /* TARGET_TMS570_HDK */
 
-#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"
-#endif
 
-#include "rpp/sdc.h"
-#include "rpp/sdr.h"
-#include "rpp/irc.h"
 
 /* Library main functions */
 
 /**
  * Library initialization function.
  *
- * This is a convenient function, which should be called only if all of the peripherals are going to be used by
- * the software.
- *
- * To initialize the selected peripherals only, call the rpp_periph_init() function for each one of them instead
- * of this function.
+ * 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.