jtag: make caller always allocate buffer
[openocd.git] / src / jtag / jtag.h
index db7cd5c9d78e8aa564146ea14cbe06d2650abbc3..f4b89a7ffeaf1845ba00cacb088e214ece886851 100644 (file)
@@ -105,8 +105,6 @@ extern tap_state_t cmd_queue_cur_state;
  *
  * In addition, this structure includes a value and mask that is used by
  * jtag_add_dr_scan_check() to validate the value that was scanned out.
- *
- * The allocated, modified, and intmp fields are internal work space.
  */
 struct scan_field {
        /// The number of bits this field specifies (up to 32)
@@ -120,13 +118,6 @@ struct scan_field {
        uint8_t* check_value;
        /// The mask to go with check_value
        uint8_t* check_mask;
-
-       /// in_value has been allocated for the queue
-       int allocated;
-       /// Indicates we modified the in_value.
-       int modified;
-       /// temporary storage for performing value checks synchronously
-       uint8_t intmp[4];
 };
 
 struct jtag_tap {
@@ -164,6 +155,8 @@ struct jtag_tap {
        struct jtag_tap_event_action *event_action;
 
        struct jtag_tap* next_tap;
+       /* dap instance if some null if no instance , initialized to 0 by calloc*/
+       struct adiv5_dap *dap; 
 };
 
 void jtag_tap_init(struct jtag_tap *tap);
@@ -173,6 +166,7 @@ struct jtag_tap* jtag_all_taps(void);
 const char *jtag_tap_name(const struct jtag_tap *tap);
 struct jtag_tap* jtag_tap_by_string(const char* dotted_name);
 struct jtag_tap* jtag_tap_by_jim_obj(Jim_Interp* interp, Jim_Obj* obj);
+struct jtag_tap* jtag_tap_by_position(unsigned abs_position);
 struct jtag_tap* jtag_tap_next_enabled(struct jtag_tap* p);
 unsigned jtag_tap_count_enabled(void);
 unsigned jtag_tap_count(void);
@@ -368,17 +362,6 @@ void jtag_add_plain_ir_scan(int num_bits, const uint8_t *out_bits, uint8_t *in_b
                tap_state_t endstate);
 
 
-/**
- * Set in_value to point to 32 bits of memory to scan into. This
- * function is a way to handle the case of synchronous and asynchronous
- * JTAG queues.
- *
- * In the event of an asynchronous queue execution the queue buffer
- * allocation method is used, for the synchronous case the temporary 32
- * bits come from the input field itself.
- */
-void jtag_alloc_in_value32(struct scan_field *field);
-
 /**
  * Generate a DR SCAN using the fields passed to the function.
  * For connected TAPs, the function checks in_fields and uses fields
@@ -695,4 +678,6 @@ void jtag_poll_set_enabled(bool value);
 
 bool transport_is_jtag(void);
 
+int jim_jtag_newtap(Jim_Interp *interp, int argc, Jim_Obj *const *argv);
+
 #endif /* JTAG_H */

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)