Index: src/cmd/cmd_tdo.c =================================================================== --- src/cmd/cmd_tdo.c (revision 0) +++ src/cmd/cmd_tdo.c (revision 0) @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2008 K. Waschk + * + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + * + * Written by Kolja Waschk, 2008 + * based on idea and code by Sebastian Hesselbarth, 2008 + * and code by Marcel Telka , 2003. + * + */ + +#include + +#include +#include +#include + +#include +#include +#include + +#include + +#include "cmd.h" + +static int +cmd_tdo_run( urj_chain_t *chain, char *params[] ) +{ + int val = 0; + val = urj_tap_cable_get_tdo(chain->cable); + urj_log (URJ_LOG_LEVEL_NORMAL, _("%d\n"), val); + return 0; +} + +static void +cmd_tdo_help( void ) +{ + printf( _( + "Usage: %s\n" + ), "tdo" ); +} + +const urj_cmd_t urj_cmd_tdo = { + "tdo", + N_("Get state of POD TDO signal"), + cmd_tdo_help, + cmd_tdo_run +}; Index: src/cmd/Makefile.am =================================================================== --- src/cmd/Makefile.am (revision 2026) +++ src/cmd/Makefile.am (working copy) @@ -55,6 +55,7 @@ cmd_endian.c \ cmd_peekpoke.c \ cmd_pod.c \ + cmd_tdo.c \ cmd_readmem.c \ cmd_writemem.c \ cmd_flashmem.c \