aboutsummaryrefslogtreecommitdiff
path: root/src/flash/nor/core.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/flash/nor/core.h')
-rw-r--r--src/flash/nor/core.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/flash/nor/core.h b/src/flash/nor/core.h
index 1dfd721b..a35f64f6 100644
--- a/src/flash/nor/core.h
+++ b/src/flash/nor/core.h
@@ -3,6 +3,7 @@
* Copyright (C) 2007,2008 Øyvind Harboe <oyvind.harboe@zylin.com> *
* Copyright (C) 2008 by Spencer Oliver <spen@spen-soft.co.uk> *
* Copyright (C) 2009 Zachary T Welch <zw@superlucidity.net> *
+ * Copyright (C) 2010 by Antonio Borneo <borneo.antonio@gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@@ -136,6 +137,16 @@ void flash_set_dirty(void);
/// @returns The number of flash banks currently defined.
int flash_get_bank_count(void);
/**
+ * Provides default read implementation for flash memory.
+ * @param bank The bank to read.
+ * @param buffer The data bytes read.
+ * @param offset The offset into the chip to read.
+ * @param count The number of bytes to read.
+ * @returns ERROR_OK if successful; otherwise, an error code.
+ */
+int default_flash_read(struct flash_bank *bank,
+ uint8_t *buffer, uint32_t offset, uint32_t count);
+/**
* Provides default erased-bank check handling. Checks to see if
* the flash driver knows they are erased; if things look uncertain,
* this routine will call default_flash_mem_blank_check() to confirm.