adi_v5: Remove unused features of the DAP and SWD interfaces
[openocd.git] / src / jtag / drivers / cmsis_dap_usb.c
index dc59fcf9c2bcfc9e006e8c6dedfefb4a0db1645b..6276595f4e381b92a09c377472edd02be59296a3 100644 (file)
@@ -534,46 +534,6 @@ static int cmsis_dap_swd_write_reg(uint8_t cmd, uint32_t value)
        return retval;
 }
 
-static int cmsis_dap_swd_read_block(uint8_t cmd, uint32_t blocksize, uint8_t *dest_buf)
-{
-       uint8_t *buffer;
-       int tfer_sz;
-       int retval = ERROR_OK;
-       uint16_t read_count;
-
-       DEBUG_IO("CMSIS-DAP: Read Block 0x%02" PRIx8 " %" PRIu32, cmd, blocksize);
-
-       while (blocksize) {
-
-               buffer = cmsis_dap_handle->packet_buffer;
-               tfer_sz = blocksize;
-               if (tfer_sz > 15)
-                       tfer_sz = 8;
-
-               buffer[0] = 0;  /* report number */
-               buffer[1] = CMD_DAP_TFER_BLOCK;
-               buffer[2] = 0x00;
-               buffer[3] = tfer_sz;
-               buffer[4] = 0x00;
-               buffer[5] = cmd;
-               retval = cmsis_dap_usb_xfer(cmsis_dap_handle, 6);
-
-               read_count = le_to_h_u16(&buffer[1]);
-               if (read_count != tfer_sz) {
-                       LOG_ERROR("CMSIS-DAP: Block Read Error (0x%02" PRIx8 ")", buffer[3]);
-                       retval = buffer[3];
-               }
-
-               read_count *= 4;
-               memcpy(dest_buf, &buffer[4], read_count);
-
-               dest_buf += read_count;
-               blocksize -= tfer_sz;
-       }
-
-       return retval;
-}
-
 static int cmsis_dap_get_version_info(void)
 {
        uint8_t *data;
@@ -1112,7 +1072,6 @@ static const struct swd_driver cmsis_dap_swd_driver = {
        .init       = cmsis_dap_swd_init,
        .read_reg   = cmsis_dap_swd_read_reg,
        .write_reg  = cmsis_dap_swd_write_reg,
-       .read_block = cmsis_dap_swd_read_block
 };
 
 const char *cmsis_dap_transport[] = {"cmsis-dap", NULL};

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)