X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Ftarget%2Ftarget.h;h=8e1c8f95da5dac0f8f0542e3276b2cce58a9f99f;hp=124dc9b709b4af0bef06f8c82216d88f8216132b;hb=cdd8928a560252e3c7f11911864fe01a1864a0bf;hpb=517ba0690dcc9e859a05df2113ce32401a5ab254 diff --git a/src/target/target.h b/src/target/target.h index 124dc9b709..8e1c8f95da 100644 --- a/src/target/target.h +++ b/src/target/target.h @@ -328,7 +328,7 @@ int target_call_event_callbacks(struct target *target, enum target_event event); */ int target_register_timer_callback(int (*callback)(void *priv), int time_ms, int periodic, void *priv); - +int target_unregister_timer_callback(int (*callback)(void *priv), void *priv); int target_call_timer_callbacks(void); /** * Invoke this to ensure that e.g. polling timer callbacks happen before @@ -474,7 +474,7 @@ int target_wait_algorithm(struct target *target, * */ int target_run_flash_async_algorithm(struct target *target, - uint8_t *buffer, uint32_t count, int block_size, + const uint8_t *buffer, uint32_t count, int block_size, int num_mem_params, struct mem_param *mem_params, int num_reg_params, struct reg_param *reg_params, uint32_t buffer_start, uint32_t buffer_size, @@ -593,21 +593,27 @@ uint32_t target_get_working_area_avail(struct target *target); extern struct target *all_targets; +uint64_t target_buffer_get_u64(struct target *target, const uint8_t *buffer); uint32_t target_buffer_get_u32(struct target *target, const uint8_t *buffer); uint32_t target_buffer_get_u24(struct target *target, const uint8_t *buffer); uint16_t target_buffer_get_u16(struct target *target, const uint8_t *buffer); +void target_buffer_set_u64(struct target *target, uint8_t *buffer, uint64_t value); void target_buffer_set_u32(struct target *target, uint8_t *buffer, uint32_t value); void target_buffer_set_u24(struct target *target, uint8_t *buffer, uint32_t value); void target_buffer_set_u16(struct target *target, uint8_t *buffer, uint16_t value); +void target_buffer_get_u64_array(struct target *target, const uint8_t *buffer, uint32_t count, uint64_t *dstbuf); void target_buffer_get_u32_array(struct target *target, const uint8_t *buffer, uint32_t count, uint32_t *dstbuf); void target_buffer_get_u16_array(struct target *target, const uint8_t *buffer, uint32_t count, uint16_t *dstbuf); +void target_buffer_set_u64_array(struct target *target, uint8_t *buffer, uint32_t count, const uint64_t *srcbuf); void target_buffer_set_u32_array(struct target *target, uint8_t *buffer, uint32_t count, const uint32_t *srcbuf); void target_buffer_set_u16_array(struct target *target, uint8_t *buffer, uint32_t count, const uint16_t *srcbuf); +int target_read_u64(struct target *target, uint64_t address, uint64_t *value); int target_read_u32(struct target *target, uint32_t address, uint32_t *value); int target_read_u16(struct target *target, uint32_t address, uint16_t *value); int target_read_u8(struct target *target, uint32_t address, uint8_t *value); +int target_write_u64(struct target *target, uint64_t address, uint64_t value); int target_write_u32(struct target *target, uint32_t address, uint32_t value); int target_write_u16(struct target *target, uint32_t address, uint16_t value); int target_write_u8(struct target *target, uint32_t address, uint8_t value);