]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/blob - rpp/src/rpp/rpp.c
Compile errors fixed
[pes-rpp/rpp-lib.git] / rpp / src / rpp / rpp.c
1 /* Copyright (C) 2013 Czech Technical University in Prague
2  *
3  * Authors:
4  *     - Carlos Jenkins <carlos@jenkins.co.cr>
5  *
6  * This document contains proprietary information belonging to Czech
7  * Technical University in Prague. Passing on and copying of this
8  * document, and communication of its contents is not permitted
9  * without prior written authorization.
10  *
11  * File : rpp.c
12  * Abstract:
13  *     RPP API library implementation file.
14  *
15  * References:
16  *     rpp.h
17  *     RPP API documentation.
18  */
19
20
21 #include "rpp/rpp.h"
22
23 #if rppCONFIG_DRV == 1
24 #include "drv/drv.h"
25 #endif
26
27 static boolean_t rpp_initialized = FALSE;
28
29 int8_t rpp_init() {
30
31     if(rpp_initialized) {
32         return FAILURE;
33     }
34     rpp_initialized = TRUE;
35
36 #if rppCONFIG_DRV == 1
37     dmmInit();
38     gioInit();
39     hetInit();
40     canInit();
41     linInit();
42     spi_tms570_init();
43 #endif
44
45     rpp_din_init();
46     rpp_lout_init();
47     rpp_adc_init();
48     rpp_dac_init();
49     rpp_hbr_init();
50     rpp_mout_init();
51     rpp_hout_init();
52     rpp_lin_init();
53     rpp_sci_init();
54 #if rppPOSIX_VERSION  == 0
55     rpp_eth_init();
56 #endif /* rppPOSIX_VERSION */
57     rpp_sdc_init();
58     rpp_sdr_init();
59     rpp_irc_init();
60 #if rppCONFIG_DRV == 1
61     _enable_IRQ();
62 #endif
63
64     return SUCCESS;
65 }