diff options
author | Marc Schink <openocd-dev@marcschink.de> | 2019-02-15 14:31:19 +0100 |
---|---|---|
committer | Tomas Vanek <vanekt@fbl.cz> | 2019-03-01 08:31:50 +0000 |
commit | 17a052d6fe44fc265d48e94bdd3356d6f25ca064 (patch) | |
tree | 9a611c4644b0e328b9be6ddab7e76391a19b2f05 /src/target/target.h | |
parent | f21c12abecb9df244f147740166378ede7ea398e (diff) | |
download | riscv-openocd-17a052d6fe44fc265d48e94bdd3356d6f25ca064.zip riscv-openocd-17a052d6fe44fc265d48e94bdd3356d6f25ca064.tar.gz riscv-openocd-17a052d6fe44fc265d48e94bdd3356d6f25ca064.tar.bz2 |
target: Use proper data types for timer callback
Change-Id: I5ca6da767f9e96180c43b179b2c682b1b7c98563
Signed-off-by: Marc Schink <openocd-dev@marcschink.de>
Reviewed-on: http://openocd.zylin.com/4920
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Diffstat (limited to 'src/target/target.h')
-rw-r--r-- | src/target/target.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/target/target.h b/src/target/target.h index 983f450..36b131a 100644 --- a/src/target/target.h +++ b/src/target/target.h @@ -314,10 +314,15 @@ struct target_trace_callback { int (*callback)(struct target *target, size_t len, uint8_t *data, void *priv); }; +enum target_timer_type { + TARGET_TIMER_TYPE_ONESHOT, + TARGET_TIMER_TYPE_PERIODIC +}; + struct target_timer_callback { int (*callback)(void *priv); - int time_ms; - int periodic; + unsigned int time_ms; + enum target_timer_type type; bool removed; struct timeval when; void *priv; @@ -385,7 +390,7 @@ int target_call_trace_callbacks(struct target *target, size_t len, uint8_t *data * or much more rarely than specified */ int target_register_timer_callback(int (*callback)(void *priv), - int time_ms, int periodic, void *priv); + unsigned int time_ms, enum target_timer_type type, void *priv); int target_unregister_timer_callback(int (*callback)(void *priv), void *priv); int target_call_timer_callbacks(void); /** |