X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Fjtag%2Fzy1000%2Fzy1000.c;h=861925887fa4cd732eb281aee8522ec587ad3248;hp=14a2aac80a4b517c088f491a0fe345a78edada33;hb=42ef503d37b18d907da16d26e99167566d5aabd1;hpb=197a195191c2983d7730906a8cd99fe947a49169 diff --git a/src/jtag/zy1000/zy1000.c b/src/jtag/zy1000/zy1000.c index 14a2aac80a..861925887f 100644 --- a/src/jtag/zy1000/zy1000.c +++ b/src/jtag/zy1000/zy1000.c @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2007-2008 by �yvind Harboe * + * Copyright (C) 2007-2008 by Øyvind Harboe * * * * 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 * @@ -23,16 +23,16 @@ #include "embeddedice.h" #include "minidriver.h" #include "interface.h" +#include "zy1000_version.h" #include // low level i/o #include - -#define ZYLIN_VERSION "1.54" +#define ZYLIN_VERSION GIT_ZY1000_VERSION #define ZYLIN_DATE __DATE__ #define ZYLIN_TIME __TIME__ -#define ZYLIN_OPENOCD "$Revision$" -#define ZYLIN_OPENOCD_VERSION "Zylin JTAG ZY1000 " ZYLIN_VERSION " " ZYLIN_DATE " " ZYLIN_TIME +#define ZYLIN_OPENOCD GIT_OPENOCD_VERSION +#define ZYLIN_OPENOCD_VERSION "ZY1000 " ZYLIN_VERSION " " ZYLIN_DATE /* low level command set */ @@ -270,10 +270,7 @@ static int jim_zy1000_version(Jim_Interp *interp, int argc, Jim_Obj *const *argv const char *str = Jim_GetString(argv[1], NULL); if (strcmp("openocd", str) == 0) { - int revision; - revision = atol(ZYLIN_OPENOCD + strlen("XRevision: ")); - sprintf(buff, "%d", revision); - version_str = buff; + version_str = ZYLIN_OPENOCD; } else if (strcmp("zy1000", str) == 0) { @@ -283,6 +280,10 @@ static int jim_zy1000_version(Jim_Interp *interp, int argc, Jim_Obj *const *argv { version_str = ZYLIN_DATE; } + else if (strcmp("time", str) == 0) + { + version_str = ZYLIN_TIME; + } else if (strcmp("pcb", str) == 0) { #ifdef CYGPKG_HAL_NIOS2 @@ -531,18 +532,12 @@ static __inline void scanFields(int num_fields, const scan_field_t *fields, tap_ } } -int interface_jtag_set_end_state(tap_state_t state) -{ - return ERROR_OK; -} - - int interface_jtag_add_ir_scan(int num_fields, const scan_field_t *fields, tap_state_t state) { int j; int scan_size = 0; - jtag_tap_t *tap, *nextTap; + struct jtag_tap *tap, *nextTap; for (tap = jtag_tap_next_enabled(NULL); tap!= NULL; tap = nextTap) { nextTap = jtag_tap_next_enabled(tap); @@ -606,7 +601,7 @@ int interface_jtag_add_dr_scan(int num_fields, const scan_field_t *fields, tap_s { int j; - jtag_tap_t *tap, *nextTap; + struct jtag_tap *tap, *nextTap; for (tap = jtag_tap_next_enabled(NULL); tap!= NULL; tap = nextTap) { nextTap = jtag_tap_next_enabled(tap); @@ -657,9 +652,6 @@ int interface_jtag_add_tlr() -extern int jtag_nsrst_delay; -extern int jtag_ntrst_delay; - int interface_jtag_add_reset(int req_trst, int req_srst) { zy1000_reset(req_trst, req_srst); @@ -767,7 +759,7 @@ int interface_jtag_add_pathmove(int num_states, const tap_state_t *path) -void embeddedice_write_dcc(jtag_tap_t *tap, int reg_addr, uint8_t *buffer, int little, int count) +void embeddedice_write_dcc(struct jtag_tap *tap, int reg_addr, uint8_t *buffer, int little, int count) { // static int const reg_addr = 0x5; tap_state_t end_state = jtag_get_end_state();