X-Git-Url: http://rtime.felk.cvut.cz/gitweb/pes-rpp/rpp-test-sw.git/blobdiff_plain/31a07c0eeac49bc43941cb8598158f7b9511ff19..5e93bbbb1d36af8d76fe433de6219038ffc65774:/rpp-test-sw/commands/cmd_hout.c diff --git a/rpp-test-sw/commands/cmd_hout.c b/rpp-test-sw/commands/cmd_hout.c index fa08f01..cf19029 100644 --- a/rpp-test-sw/commands/cmd_hout.c +++ b/rpp-test-sw/commands/cmd_hout.c @@ -6,18 +6,10 @@ * Authors: * - Michal Horn * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * This document contains proprietary information belonging to Czech + * Technical University in Prague. Passing on and copying of this + * document, and communication of its contents is not permitted + * without prior written authorization. * * File : cmd_hout.c * @@ -32,8 +24,9 @@ #ifndef DOCGEN #include "rpp/rpp.h" -#include "hal/hal.h" -#include "drv/drv.h" +/* FIXME: remove hout.h */ +#include "drv/hout.h" +#include "drv/digital_io_def.h" #include "cmdproc_utils.h" @@ -48,17 +41,16 @@ int cmd_do_read_hout_ifbk_values(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) { uint32_t i; // Cycle control variable - port_desc_t *desc; - uint32_t values[PORT_HOUTIFBK_CHANNEL_NUM*2]; + uint32_t port_num_values = rpp_port_get_pin_cnt(DIO_PORT_NAME_HOUTIFBK); + uint32_t values[port_num_values*2]; int ret; - desc = hal_port_get_dsc(PORT_NAME_HOUTIFBK, -1); - ret = desc->port_getfnc_ptr(desc->config, PORT_HOUTIFBK_CHANNEL_NUM, values); + ret = rpp_port_get_val(DIO_PORT_NAME_HOUTIFBK, port_num_values, values); if (ret < 0) return ret; - for (i = 0; i < PORT_HOUTIFBK_CHANNEL_NUM; i++) { + for (i = 0; i < port_num_values; i++) { rpp_sci_printf("HOUT%d: %d\n", i+1, values[i]); } return 0;