target/armv7m_trace: Use prefix for enums
[openocd.git] / src / target / armv7m_trace.c
index c1e4f5baac33d7f2b8a5c282c7c56f605bddfc59..62f0f8e61db7a1a47de4877b509e323d50c496d6 100644 (file)
@@ -62,7 +62,7 @@ int armv7m_trace_tpiu_config(struct target *target)
        target_unregister_timer_callback(armv7m_poll_trace, target);
 
 
-       retval = adapter_config_trace(trace_config->config_type == INTERNAL,
+       retval = adapter_config_trace(trace_config->config_type == TRACE_CONFIG_TYPE_INTERNAL,
                                      trace_config->pin_protocol,
                                      trace_config->port_size,
                                      &trace_config->trace_freq);
@@ -83,7 +83,7 @@ int armv7m_trace_tpiu_config(struct target *target)
                          trace_config->trace_freq, trace_config->traceclkin_freq,
                          trace_freq);
                trace_config->trace_freq = trace_freq;
-               retval = adapter_config_trace(trace_config->config_type == INTERNAL,
+               retval = adapter_config_trace(trace_config->config_type == TRACE_CONFIG_TYPE_INTERNAL,
                                              trace_config->pin_protocol,
                                              trace_config->port_size,
                                              &trace_config->trace_freq);
@@ -115,7 +115,7 @@ int armv7m_trace_tpiu_config(struct target *target)
        if (retval != ERROR_OK)
                return retval;
 
-       if (trace_config->config_type == INTERNAL)
+       if (trace_config->config_type == TRACE_CONFIG_TYPE_INTERNAL)
                target_register_timer_callback(armv7m_poll_trace, 1, 1, target);
 
        target_call_event_callbacks(target, TARGET_EVENT_TRACE_CONFIG);
@@ -173,7 +173,7 @@ COMMAND_HANDLER(handle_tpiu_config_command)
                if (CMD_ARGC == cmd_idx + 1) {
                        close_trace_file(armv7m);
 
-                       armv7m->trace_config.config_type = DISABLED;
+                       armv7m->trace_config.config_type = TRACE_CONFIG_TYPE_DISABLED;
                        if (CMD_CTX->mode == COMMAND_EXEC)
                                return armv7m_trace_tpiu_config(target);
                        else
@@ -183,13 +183,13 @@ COMMAND_HANDLER(handle_tpiu_config_command)
                   !strcmp(CMD_ARGV[cmd_idx], "internal")) {
                close_trace_file(armv7m);
 
-               armv7m->trace_config.config_type = EXTERNAL;
+               armv7m->trace_config.config_type = TRACE_CONFIG_TYPE_EXTERNAL;
                if (!strcmp(CMD_ARGV[cmd_idx], "internal")) {
                        cmd_idx++;
                        if (CMD_ARGC == cmd_idx)
                                return ERROR_COMMAND_SYNTAX_ERROR;
 
-                       armv7m->trace_config.config_type = INTERNAL;
+                       armv7m->trace_config.config_type = TRACE_CONFIG_TYPE_INTERNAL;
 
                        if (strcmp(CMD_ARGV[cmd_idx], "-") != 0) {
                                armv7m->trace_config.trace_file = fopen(CMD_ARGV[cmd_idx], "ab");
@@ -204,7 +204,7 @@ COMMAND_HANDLER(handle_tpiu_config_command)
                        return ERROR_COMMAND_SYNTAX_ERROR;
 
                if (!strcmp(CMD_ARGV[cmd_idx], "sync")) {
-                       armv7m->trace_config.pin_protocol = SYNC;
+                       armv7m->trace_config.pin_protocol = TPIU_PIN_PROTOCOL_SYNC;
 
                        cmd_idx++;
                        if (CMD_ARGC == cmd_idx)
@@ -213,9 +213,9 @@ COMMAND_HANDLER(handle_tpiu_config_command)
                        COMMAND_PARSE_NUMBER(u32, CMD_ARGV[cmd_idx], armv7m->trace_config.port_size);
                } else {
                        if (!strcmp(CMD_ARGV[cmd_idx], "manchester"))
-                               armv7m->trace_config.pin_protocol = ASYNC_MANCHESTER;
+                               armv7m->trace_config.pin_protocol = TPIU_PIN_PROTOCOL_ASYNC_MANCHESTER;
                        else if (!strcmp(CMD_ARGV[cmd_idx], "uart"))
-                               armv7m->trace_config.pin_protocol = ASYNC_UART;
+                               armv7m->trace_config.pin_protocol = TPIU_PIN_PROTOCOL_ASYNC_UART;
                        else
                                return ERROR_COMMAND_SYNTAX_ERROR;
 
@@ -237,7 +237,7 @@ COMMAND_HANDLER(handle_tpiu_config_command)
                        COMMAND_PARSE_NUMBER(uint, CMD_ARGV[cmd_idx], armv7m->trace_config.trace_freq);
                        cmd_idx++;
                } else {
-                       if (armv7m->trace_config.config_type != INTERNAL) {
+                       if (armv7m->trace_config.config_type != TRACE_CONFIG_TYPE_INTERNAL) {
                                LOG_ERROR("Trace port frequency can't be omitted in external capture mode");
                                return ERROR_COMMAND_SYNTAX_ERROR;
                        }

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)