- Fixes '=' whitespace
[openocd.git] / src / jtag / minidummy / minidummy.c
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
22
23 #include "embeddedice.h"
24 #include "minidriver.h"
25 #include "interface.h"
26
27
28
29
30 jtag_interface_t minidummy_interface =
31 {
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,
42 };
43
44
45
46
47
48
49 int interface_jtag_execute_queue(void)
50 {
51 /* synchronously do the operation here */
52
53 return ERROR_OK;
54 }
55
56
57
58
59
60 extern int jtag_check_value(uint8_t *captured, void *priv);
61
62 int interface_jtag_set_end_state(tap_state_t state)
63 {
64 return ERROR_OK;
65 }
66
67
68 int interface_jtag_add_ir_scan(int num_fields, const scan_field_t *fields, tap_state_t state)
69 {
70 /* synchronously do the operation here */
71
72 return ERROR_OK;
73
74 }
75
76
77
78
79
80 int interface_jtag_add_plain_ir_scan(int num_fields, const scan_field_t *fields, tap_state_t state)
81 {
82 /* synchronously do the operation here */
83
84 return ERROR_OK;
85 }
86
87 /*extern jtag_command_t **jtag_get_last_command_p(void);*/
88
89 int interface_jtag_add_dr_scan(int num_fields, const scan_field_t *fields, tap_state_t state)
90 {
91 /* synchronously do the operation here */
92
93 return ERROR_OK;
94 }
95
96 int interface_jtag_add_plain_dr_scan(int num_fields, const scan_field_t *fields, tap_state_t state)
97 {
98 /* synchronously do the operation here */
99
100 return ERROR_OK;
101 }
102
103
104 int interface_jtag_add_tlr()
105 {
106 /* synchronously do the operation here */
107
108 return ERROR_OK;
109 }
110
111
112
113 int interface_jtag_add_reset(int req_trst, int req_srst)
114 {
115 /* synchronously do the operation here */
116
117 return ERROR_OK;
118 }
119
120
121 int interface_jtag_add_runtest(int num_cycles, tap_state_t state)
122 {
123 /* synchronously do the operation here */
124
125 return ERROR_OK;
126 }
127
128 int interface_jtag_add_clocks(int num_cycles)
129 {
130 /* synchronously do the operation here */
131
132 return ERROR_OK;
133 }
134
135 int interface_jtag_add_sleep(uint32_t us)
136 {
137 jtag_sleep(us);
138 return ERROR_OK;
139 }
140
141 int interface_jtag_add_pathmove(int num_states, const tap_state_t *path)
142 {
143 int state_count;
144 int tms = 0;
145
146 state_count = 0;
147
148 tap_state_t cur_state = cmd_queue_cur_state;
149
150 while (num_states)
151 {
152 if (tap_state_transition(cur_state, false) == path[state_count])
153 {
154 tms = 0;
155 }
156 else if (tap_state_transition(cur_state, true) == path[state_count])
157 {
158 tms = 1;
159 }
160 else
161 {
162 LOG_ERROR("BUG: %s -> %s isn't a valid TAP transition", tap_state_name(cur_state), tap_state_name(path[state_count]));
163 exit(-1);
164 }
165
166 /* synchronously do the operation here */
167
168 cur_state = path[state_count];
169 state_count++;
170 num_states--;
171 }
172
173
174 /* synchronously do the operation here */
175
176 return ERROR_OK;
177 }
178
179
180
181 void embeddedice_write_dcc(jtag_tap_t *tap, int reg_addr, uint8_t *buffer, int little, int count)
182 {
183 int i;
184 for (i = 0; i < count; i++)
185 {
186 embeddedice_write_reg_inner(tap, reg_addr, fast_target_buffer_get_u32(buffer, little));
187 buffer += 4;
188 }
189 }
190

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)