OpenOCD
angie/include/msgtypes.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2 
3 ****************************************************************************
4  File : msgtypes.h *
5  Contents : Definition of the commands supported by NanoXplore *
6  USB-JTAG ANGIE adapter hardware. *
7  Based on openULINK project code by: Martin Schmoelzer. *
8  Copyright 2023, Ahmed Errached BOUDJELIDA, NanoXplore SAS. *
9  <aboudjelida@nanoxplore.com> *
10  <ahmederrachedbjld@gmail.com> *
11 *****************************************************************************/
12 
127 #ifndef __MSGTYPES_H
128 #define __MSGTYPES_H
129 
130 /*
131  * Command IDs:
132  *
133  * Bits 7..6: Reserved, should always be zero
134  * Bits 5..0: Command ID. There are 62 usable IDs. Of this 63 available IDs,
135  * the IDs 0x00..0x1F are commands with variable payload size,
136  * the IDs 0x20..0x3F are commands with fixed payload size.
137  */
138 
139 #define CMD_ID_MASK 0x3F
140 
141 /* Commands with variable payload size */
142 #define CMD_SCAN_IN 0x00
143 #define CMD_SLOW_SCAN_IN 0x01
144 #define CMD_SCAN_OUT 0x02
145 #define CMD_SLOW_SCAN_OUT 0x03
146 #define CMD_SCAN_IO 0x04
147 #define CMD_SLOW_SCAN_IO 0x05
148 
149 /* Commands with fixed payload size */
150 #define CMD_CLOCK_TMS 0x20
151 #define CMD_SLOW_CLOCK_TMS 0x21
152 #define CMD_CLOCK_TCK 0x22
153 #define CMD_SLOW_CLOCK_TCK 0x23
154 #define CMD_SLEEP_US 0x24
155 #define CMD_SLEEP_MS 0x25
156 #define CMD_GET_SIGNALS 0x26
157 #define CMD_SET_SIGNALS 0x27
158 #define CMD_CONFIGURE_TCK_FREQ 0x28
159 #define CMD_SET_LEDS 0x29
160 #define CMD_TEST 0x2A
161 
162 /* JTAG signal definition for jtag_get_signals() -- Input signals! */
163 #define SIGNAL_TDO 1
164 
165 /* JTAG signal definition for jtag_get_signals() -- Output signals! */
166 #define SIGNAL_TDI 8
167 #define SIGNAL_TMS 2
168 #define SIGNAL_TCK 4
169 #define SIGNAL_TRST 1
170 #define SIGNAL_SRST 32
171 
172 #endif