1 /* Copyright (C) 2013 Czech Technical University in Prague
4 * - Carlos Jenkins <carlos@jenkins.co.cr>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 * RPP API library implementation file.
25 * RPP API documentation.
31 #if rppCONFIG_DRV == 1
35 boolean_t initialized = FALSE;
44 // FIXME This is horrible
45 #if rppCONFIG_DRV == 1
54 #if rppCONFIG_INCLUDE_DIN == 1
58 #if rppCONFIG_INCLUDE_LOUT == 1
62 #if rppCONFIG_INCLUDE_ADC == 1
66 #if rppCONFIG_INCLUDE_DAC == 1
70 #if rppCONFIG_INCLUDE_HBR == 1
74 #if rppCONFIG_INCLUDE_MOUT == 1
78 #if rppCONFIG_INCLUDE_HOUT == 1
82 #if rppCONFIG_INCLUDE_CAN == 1
83 struct rpp_can_config can_config;
84 struct rpp_can_tx_config can_tx_config[1];
85 struct rpp_can_rx_config can_rx_config[1];
87 can_config.num_tx_obj = 1;
88 can_config.num_rx_obj = 1;
89 can_config.tx_config = can_tx_config;
90 can_config.rx_config = can_rx_config;
92 can_config.tx_config[0].type = RPP_CAN_EXTENDED;
93 can_config.tx_config[0].controller = 2;
94 can_config.tx_config[0].msg_obj = 1;
96 can_config.rx_config[0].type = RPP_CAN_EXTENDED;
97 can_config.rx_config[0].controller = 2;
98 can_config.rx_config[0].msg_obj = 2;
99 can_config.rx_config[0].id = 2;
100 can_config.rx_config[0].mask = 0;
102 rpp_can_init(&can_config);
105 #if rppCONFIG_INCLUDE_LIN == 1
109 #if rppCONFIG_INCLUDE_SCI == 1
113 #if rppCONFIG_INCLUDE_ETH == 1
117 #if rppCONFIG_INCLUDE_SDC == 1
121 #if rppCONFIG_INCLUDE_SDR == 1
125 #if rppCONFIG_DRV == 1