From 02f3765351c9e25185b745b84f1a2604fb2149c7 Mon Sep 17 00:00:00 2001 From: mifi Date: Tue, 18 Dec 2007 21:20:28 +0000 Subject: - added patch for new flash functionality like: flash verify_image and flash erase_address. - added patch for new parport_write_on_exit command. Even this patch will fix some memory leaks. (thanks too oyvind and Spen for these patches) git-svn-id: svn://svn.berlios.de/openocd/trunk@240 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/flash/flash.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/flash/flash.h') diff --git a/src/flash/flash.h b/src/flash/flash.h index e8f91500..b90b64eb 100644 --- a/src/flash/flash.h +++ b/src/flash/flash.h @@ -63,11 +63,18 @@ typedef struct flash_bank_s struct flash_bank_s *next; } flash_bank_t; +enum flash_image_op +{ + flash_image_op_write = 0, + flash_image_op_verify, + flash_image_op_erase +}; + extern int flash_register_commands(struct command_context_s *cmd_ctx); extern int flash_init(struct command_context_s *cmd_ctx); extern int flash_erase(target_t *target, u32 addr, u32 length); -extern int flash_write(target_t *target, image_t *image, u32 *written, char **error, int *failed, int erase); +extern int flash_image_operation(target_t *target, image_t *image, u32 *written, char **error_str, int *failed, enum flash_image_op op); extern flash_bank_t *get_flash_bank_by_num(int num); extern flash_bank_t *get_flash_bank_by_addr(target_t *target, u32 addr); -- cgit v1.2.3