1 /* Copyright (C) 2012-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 driver implementation for MOUT.
25 * hal/gpio_tms570_def.h
31 const static uint32_t dsc_pin_map[6U][2U] = {
32 {PIN_DSC_MOUT1IN, PIN_DSC_MOUT1EN},
33 {PIN_DSC_MOUT2IN, PIN_DSC_MOUT2EN},
34 {PIN_DSC_MOUT3IN, PIN_DSC_MOUT3EN},
35 {PIN_DSC_MOUT4IN, PIN_DSC_MOUT4EN},
36 {PIN_DSC_MOUT5IN, PIN_DSC_MOUT5EN},
37 {PIN_DSC_MOUT6IN, PIN_DSC_MOUT6EN}
41 int8_t drv_mout_set(uint8_t pin, uint8_t val)
48 hal_gpio_pin_set_value(dsc_pin_map[pin][0], val);
53 int8_t drv_mout_diag(uint8_t pin)
60 if(hal_gpio_pin_get_value(dsc_pin_map[pin][1]) == 1) {