target/cortex_m: fix clang static analyzer warning
[openocd.git] / src / target / arm_cti.h
1 /***************************************************************************
2 * Copyright (C) 2016 by Matthias Welwarsky *
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 * *
18 ***************************************************************************/
19
20 #ifndef OPENOCD_TARGET_ARM_CTI_H
21 #define OPENOCD_TARGET_ARM_CTI_H
22
23 /*define CTI(cross trigger interface)*/
24 #define CTI_CTR 0x0
25 #define CTI_INACK 0x10
26 #define CTI_APPSET 0x14
27 #define CTI_APPCLEAR 0x18
28 #define CTI_APPPULSE 0x1C
29 #define CTI_INEN0 0x20
30 #define CTI_INEN1 0x24
31 #define CTI_INEN2 0x28
32 #define CTI_INEN3 0x2C
33 #define CTI_INEN4 0x30
34 #define CTI_INEN5 0x34
35 #define CTI_INEN6 0x38
36 #define CTI_INEN7 0x3C
37 #define CTI_INEN8 0x40
38 #define CTI_INEN(n) (0x20 + 4 * n)
39 #define CTI_OUTEN0 0xA0
40 #define CTI_OUTEN1 0xA4
41 #define CTI_OUTEN2 0xA8
42 #define CTI_OUTEN3 0xAC
43 #define CTI_OUTEN4 0xB0
44 #define CTI_OUTEN5 0xB4
45 #define CTI_OUTEN6 0xB8
46 #define CTI_OUTEN7 0xBC
47 #define CTI_OUTEN8 0xC0
48 #define CTI_OUTEN(n) (0xA0 + 4 * n)
49 #define CTI_TRIN_STATUS 0x130
50 #define CTI_TROUT_STATUS 0x134
51 #define CTI_CHIN_STATUS 0x138
52 #define CTI_CHOU_STATUS 0x13C
53 #define CTI_GATE 0x140
54 #define CTI_UNLOCK 0xFB0
55
56 #define CTI_CHNL(x) (1 << x)
57 #define CTI_TRIG_HALT 0
58 #define CTI_TRIG_RESUME 1
59 #define CTI_TRIG(n) (1 << CTI_TRIG_##n)
60
61 /* forward-declare arm_cti struct */
62 struct arm_cti;
63 struct adiv5_ap;
64
65 extern const char *arm_cti_name(struct arm_cti *self);
66 extern struct arm_cti *cti_instance_by_jim_obj(Jim_Interp *interp, Jim_Obj *o);
67 extern int arm_cti_enable(struct arm_cti *self, bool enable);
68 extern int arm_cti_ack_events(struct arm_cti *self, uint32_t event);
69 extern int arm_cti_gate_channel(struct arm_cti *self, uint32_t channel);
70 extern int arm_cti_ungate_channel(struct arm_cti *self, uint32_t channel);
71 extern int arm_cti_write_reg(struct arm_cti *self, unsigned int reg, uint32_t value);
72 extern int arm_cti_read_reg(struct arm_cti *self, unsigned int reg, uint32_t *value);
73 extern int arm_cti_pulse_channel(struct arm_cti *self, uint32_t channel);
74 extern int arm_cti_set_channel(struct arm_cti *self, uint32_t channel);
75 extern int arm_cti_clear_channel(struct arm_cti *self, uint32_t channel);
76 extern int arm_cti_cleanup_all(void);
77 extern int cti_register_commands(struct command_context *cmd_ctx);
78
79 #endif /* OPENOCD_TARGET_ARM_CTI_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)