Use enum for target_register_timer_callback() 21/4921/3
authorMarc Schink <openocd-dev@marcschink.de>
Fri, 15 Feb 2019 13:36:54 +0000 (14:36 +0100)
committerTomas Vanek <vanekt@fbl.cz>
Fri, 1 Mar 2019 08:32:03 +0000 (08:32 +0000)
Change-Id: I268e8c5d783914aa97cbde301448b2c5bc3cb9e6
Signed-off-by: Marc Schink <openocd-dev@marcschink.de>
Reviewed-on: http://openocd.zylin.com/4921
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
src/target/aarch64.c
src/target/arm7_9_common.c
src/target/armv7m_trace.c
src/target/cortex_a.c
src/target/cortex_m.c
src/target/hla_target.c
src/target/openrisc/jsp_server.c
src/target/target.c

index 2357eb2..c9cedea 100644 (file)
@@ -2388,7 +2388,8 @@ static int aarch64_init_arch_info(struct target *target,
        armv8->armv8_mmu.read_physical_memory = aarch64_read_phys_memory;
 
        armv8_init_arch_info(target, armv8);
-       target_register_timer_callback(aarch64_handle_target_request, 1, 1, target);
+       target_register_timer_callback(aarch64_handle_target_request, 1,
+               TARGET_TIMER_TYPE_PERIODIC, target);
 
        return ERROR_OK;
 }
index 7fd1ed9..96e31b9 100644 (file)
@@ -2859,7 +2859,7 @@ int arm7_9_init_arch_info(struct target *target, struct arm7_9_common *arm7_9)
                return retval;
 
        return target_register_timer_callback(arm7_9_handle_target_request,
-               1, 1, target);
+               1, TARGET_TIMER_TYPE_PERIODIC, target);
 }
 
 static const struct command_registration arm7_9_any_command_handlers[] = {
index 62f0f8e..6170119 100644 (file)
@@ -116,7 +116,8 @@ int armv7m_trace_tpiu_config(struct target *target)
                return retval;
 
        if (trace_config->config_type == TRACE_CONFIG_TYPE_INTERNAL)
-               target_register_timer_callback(armv7m_poll_trace, 1, 1, target);
+               target_register_timer_callback(armv7m_poll_trace, 1,
+               TARGET_TIMER_TYPE_PERIODIC, target);
 
        target_call_event_callbacks(target, TARGET_EVENT_TRACE_CONFIG);
 
index 9203fb9..5d5fb96 100644 (file)
@@ -2833,7 +2833,8 @@ static int cortex_a_init_arch_info(struct target *target,
 
        /* REVISIT v7a setup should be in a v7a-specific routine */
        armv7a_init_arch_info(target, armv7a);
-       target_register_timer_callback(cortex_a_handle_target_request, 1, 1, target);
+       target_register_timer_callback(cortex_a_handle_target_request, 1,
+               TARGET_TIMER_TYPE_PERIODIC, target);
 
        return ERROR_OK;
 }
index 62d3760..d751fd8 100644 (file)
@@ -2269,7 +2269,8 @@ static int cortex_m_init_arch_info(struct target *target,
        armv7m->load_core_reg_u32 = cortex_m_load_core_reg_u32;
        armv7m->store_core_reg_u32 = cortex_m_store_core_reg_u32;
 
-       target_register_timer_callback(cortex_m_handle_target_request, 1, 1, target);
+       target_register_timer_callback(cortex_m_handle_target_request, 1,
+               TARGET_TIMER_TYPE_PERIODIC, target);
 
        return ERROR_OK;
 }
index 4f97eb9..60ed7d6 100644 (file)
@@ -346,7 +346,8 @@ static int adapter_init_arch_info(struct target *target,
        armv7m->examine_debug_reason = adapter_examine_debug_reason;
        armv7m->stlink = true;
 
-       target_register_timer_callback(hl_handle_target_request, 1, 1, target);
+       target_register_timer_callback(hl_handle_target_request, 1,
+               TARGET_TIMER_TYPE_PERIODIC, target);
 
        return ERROR_OK;
 }
index 6cd53f4..6fb764a 100644 (file)
@@ -101,7 +101,8 @@ static int jsp_new_connection(struct connection *connection)
 
        jsp_service->connection = connection;
 
-       int retval = target_register_timer_callback(&jsp_poll_read, 1, 1, jsp_service);
+       int retval = target_register_timer_callback(&jsp_poll_read, 1,
+               TARGET_TIMER_TYPE_PERIODIC, jsp_service);
        if (ERROR_OK != retval)
                return retval;
 
index a3230d2..9955a56 100644 (file)
@@ -1357,7 +1357,7 @@ static int target_init(struct command_context *cmd_ctx)
                return retval;
 
        retval = target_register_timer_callback(&handle_target,
-                       polling_interval, 1, cmd_ctx->interp);
+                       polling_interval, TARGET_TIMER_TYPE_PERIODIC, cmd_ctx->interp);
        if (ERROR_OK != retval)
                return retval;