Removed unused interface_jtag_set_end_state and wrote down some notes on TCP/IP clien...
[openocd.git] / src / jtag / minidummy / minidummy.c
blob2cab0f576e6a5b0145f3f2e345b492e90255d314
1 /***************************************************************************
2 * Copyright (C) 2007-2008 by Øyvind Harboe *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, write to the *
16 * Free Software Foundation, Inc., *
17 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
18 ***************************************************************************/
19 #ifdef HAVE_CONFIG_H
20 #include "config.h"
21 #endif
23 #include "embeddedice.h"
24 #include "minidriver.h"
25 #include "interface.h"
30 jtag_interface_t minidummy_interface =
32 .name = "minidummy",
33 .execute_queue = NULL,
34 .speed = NULL,
35 .register_commands = NULL,
36 .init = NULL,
37 .quit = NULL,
38 .khz = NULL,
39 .speed_div = NULL,
40 .power_dropout = NULL,
41 .srst_asserted = NULL,
49 int interface_jtag_execute_queue(void)
51 /* synchronously do the operation here */
53 return ERROR_OK;
60 extern int jtag_check_value(uint8_t *captured, void *priv);
62 int interface_jtag_add_ir_scan(int num_fields, const scan_field_t *fields, tap_state_t state)
64 /* synchronously do the operation here */
66 return ERROR_OK;
74 int interface_jtag_add_plain_ir_scan(int num_fields, const scan_field_t *fields, tap_state_t state)
76 /* synchronously do the operation here */
78 return ERROR_OK;
81 /*extern jtag_command_t **jtag_get_last_command_p(void);*/
83 int interface_jtag_add_dr_scan(int num_fields, const scan_field_t *fields, tap_state_t state)
85 /* synchronously do the operation here */
87 return ERROR_OK;
90 int interface_jtag_add_plain_dr_scan(int num_fields, const scan_field_t *fields, tap_state_t state)
92 /* synchronously do the operation here */
94 return ERROR_OK;
98 int interface_jtag_add_tlr()
100 /* synchronously do the operation here */
102 return ERROR_OK;
107 int interface_jtag_add_reset(int req_trst, int req_srst)
109 /* synchronously do the operation here */
111 return ERROR_OK;
115 int interface_jtag_add_runtest(int num_cycles, tap_state_t state)
117 /* synchronously do the operation here */
119 return ERROR_OK;
122 int interface_jtag_add_clocks(int num_cycles)
124 /* synchronously do the operation here */
126 return ERROR_OK;
129 int interface_jtag_add_sleep(uint32_t us)
131 jtag_sleep(us);
132 return ERROR_OK;
135 int interface_jtag_add_pathmove(int num_states, const tap_state_t *path)
137 int state_count;
138 int tms = 0;
140 state_count = 0;
142 tap_state_t cur_state = cmd_queue_cur_state;
144 while (num_states)
146 if (tap_state_transition(cur_state, false) == path[state_count])
148 tms = 0;
150 else if (tap_state_transition(cur_state, true) == path[state_count])
152 tms = 1;
154 else
156 LOG_ERROR("BUG: %s -> %s isn't a valid TAP transition", tap_state_name(cur_state), tap_state_name(path[state_count]));
157 exit(-1);
160 /* synchronously do the operation here */
162 cur_state = path[state_count];
163 state_count++;
164 num_states--;
168 /* synchronously do the operation here */
170 return ERROR_OK;
175 void embeddedice_write_dcc(jtag_tap_t *tap, int reg_addr, uint8_t *buffer, int little, int count)
177 int i;
178 for (i = 0; i < count; i++)
180 embeddedice_write_reg_inner(tap, reg_addr, fast_target_buffer_get_u32(buffer, little));
181 buffer += 4;