jtag: linuxgpiod: drop extra parenthesis
[openocd.git] / src / jtag / swim.h
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2
3 /*
4 * Copyright (C) 2020 by Antonio Borneo <borneo.antonio@gmail.com
5 */
6
7 /**
8 * @file
9 * This file implements support for STMicroelectronics debug protocol SWIM
10 * (Single Wire Interface Module).
11 */
12
13 #ifndef OPENOCD_JTAG_SWIM_H
14 #define OPENOCD_JTAG_SWIM_H
15
16 #define SWIM_FREQ_LOW 363
17 #define SWIM_FREQ_HIGH 800
18
19 struct swim_driver {
20 /**
21 * Send SRST (system reset) command to target.
22 *
23 * @return ERROR_OK on success, else a fault code.
24 */
25 int (*srst)(void);
26
27 /**
28 * Read target memory through ROTF (read on-the-fly) command.
29 *
30 * @param addr Start address to read data from target memory.
31 * @param size Size in bytes of data units, 1, 2 or 4.
32 * @param count Number of units (size units, not bytes) to read.
33 * @param buffer Data buffer to receive data.
34 * @return ERROR_OK on success, else a fault code.
35 */
36 int (*read_mem)(uint32_t addr, uint32_t size, uint32_t count,
37 uint8_t *buffer);
38
39 /**
40 * Write target memory through WOTF (write on-the-fly) command.
41 *
42 * @param addr Start address to write data to target memory.
43 * @param size Size in bytes of data units, 1, 2 or 4.
44 * @param count Number of units (size units, not bytes) to write.
45 * @param buffer Data buffer to write.
46 * @return ERROR_OK on success, else a fault code.
47 */
48 int (*write_mem)(uint32_t addr, uint32_t size, uint32_t count,
49 const uint8_t *buffer);
50
51 /**
52 * Reconnect to the target.
53 * Should be reworked to be more generic and not linked to current
54 * implementation in stlink driver.
55 *
56 * @return ERROR_OK on success, else a fault code.
57 */
58 int (*reconnect)(void);
59 };
60
61 int swim_system_reset(void);
62 int swim_read_mem(uint32_t addr, uint32_t size, uint32_t count,
63 uint8_t *buffer);
64 int swim_write_mem(uint32_t addr, uint32_t size, uint32_t count,
65 const uint8_t *buffer);
66 int swim_reconnect(void);
67
68 #endif /* OPENOCD_JTAG_SWIM_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)