From 64c0b8a298d159be7193c49c23d7e6712385fcd9 Mon Sep 17 00:00:00 2001 From: dragonmux Date: Mon, 1 Aug 2022 22:21:22 +0100 Subject: [PATCH] target_internal: typedef'd the target_flash structure to make use nicer --- src/target/target_internal.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/target/target_internal.h b/src/target/target_internal.h index 921a37b..774e6b7 100644 --- a/src/target/target_internal.h +++ b/src/target/target_internal.h @@ -32,11 +32,13 @@ struct target_ram { struct target_ram *next; }; -struct target_flash; -typedef int (*flash_erase_func)(struct target_flash *f, target_addr addr, size_t len); -typedef int (*flash_write_func)(struct target_flash *f, target_addr dest, +typedef struct target_flash target_flash_s; + +typedef int (*flash_erase_func)(target_flash_s *f, target_addr addr, size_t len); +typedef int (*flash_write_func)(target_flash_s *f, target_addr dest, const void *src, size_t len); -typedef int (*flash_done_func)(struct target_flash *f); +typedef int (*flash_done_func)(target_flash_s *f); + struct target_flash { target_addr start; size_t length;