summaryrefslogtreecommitdiff
path: root/src/flash
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-03-04 21:12:01 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-03-04 21:12:01 +0000
commit8404dc36575c4a1c0d61b91258b769e1af1201b6 (patch)
tree425d07e0d4df2974ef6f49825e2ce988cbcfc239 /src/flash
parentf955b90d28874dc238a03178503a804b3c38582a (diff)
downloadopenocd+libswd-8404dc36575c4a1c0d61b91258b769e1af1201b6.tar.gz
openocd+libswd-8404dc36575c4a1c0d61b91258b769e1af1201b6.tar.bz2
openocd+libswd-8404dc36575c4a1c0d61b91258b769e1af1201b6.tar.xz
openocd+libswd-8404dc36575c4a1c0d61b91258b769e1af1201b6.zip
Bogus error message in GDB removed
git-svn-id: svn://svn.berlios.de/openocd/trunk@443 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/flash')
-rw-r--r--src/flash/flash.c11
-rw-r--r--src/flash/flash.h1
2 files changed, 12 insertions, 0 deletions
diff --git a/src/flash/flash.c b/src/flash/flash.c
index db4449d5..92ac6fd6 100644
--- a/src/flash/flash.c
+++ b/src/flash/flash.c
@@ -181,6 +181,17 @@ flash_bank_t *get_flash_bank_by_num_noprobe(int num)
return NULL;
}
+int flash_get_bank_count()
+{
+ flash_bank_t *p;
+ int i = 0;
+ for (p = flash_banks; p; p = p->next)
+ {
+ i++;
+ }
+ return i;
+}
+
flash_bank_t *get_flash_bank_by_num(int num)
{
flash_bank_t *p = get_flash_bank_by_num_noprobe(num);
diff --git a/src/flash/flash.h b/src/flash/flash.h
index 7ba516ab..2e6c1ec0 100644
--- a/src/flash/flash.h
+++ b/src/flash/flash.h
@@ -77,6 +77,7 @@ extern int flash_init_drivers(struct command_context_s *cmd_ctx);
extern int flash_erase_address_range(target_t *target, u32 addr, u32 length);
extern int flash_write(target_t *target, image_t *image, u32 *written, int erase);
extern void flash_set_dirty(void);
+extern int flash_get_bank_count();
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);