Mercurial > flash_v2
changeset 1775:79275fdb4f20
* src/legacy_dev.c (legacy_flash_program): Added missing definition
of block_size.
* legacy_api.c: Added missing wrappers for flash_lock and
flash_unlock
| author | asl |
|---|---|
| date | Fri, 02 Feb 2007 20:06:03 +0000 |
| parents | 93e71250d9ba |
| children | 3d4d52f8a035 |
| files | packages/io/flash/current/ChangeLog packages/io/flash/current/src/legacy_api.c packages/io/flash/current/src/legacy_dev.c |
| diffstat | 3 files changed, 23 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/io/flash/current/ChangeLog +++ b/packages/io/flash/current/ChangeLog @@ -1,3 +1,10 @@ +2005-02-02 Rutger Hofman <rutger@cs.vu.nl> + + * src/legacy_dev.c (legacy_flash_program): Added missing definition + of block_size. + * legacy_api.c: Added missing wrappers for flash_lock and + flash_unlock + 2005-01-28 Nick Garnett <nickg@ecoscentric.com> * src/legacy_dev.c (legacy_flash_init): Assign flash_info.pf from
--- a/packages/io/flash/current/src/legacy_api.c +++ b/packages/io/flash/current/src/legacy_api.c @@ -141,4 +141,19 @@ char *flash_errmsg(int err) return (char *)cyg_flash_errmsg(err); } +#ifdef CYGHWR_IO_FLASH_BLOCK_LOCKING +int flash_lock(void *base, int len, void **err_address) +{ + return cyg_flash_lock((const cyg_flashaddr_t)base, + len, (cyg_flashaddr_t *)err_address); +} + +int flash_unlock(void *base, int len, void **err_address) +{ + return cyg_flash_unlock((const cyg_flashaddr_t)base, + len, (cyg_flashaddr_t *)err_address); +} +#endif + + // EOF legacy_api.c
--- a/packages/io/flash/current/src/legacy_dev.c +++ b/packages/io/flash/current/src/legacy_dev.c @@ -142,6 +142,7 @@ legacy_flash_program(struct cyg_flash_de { typedef int code_fun(cyg_flashaddr_t, const void *, int, unsigned long, int); code_fun *_flash_program_buf; + size_t block_size = dev->block_info[0].block_size; size_t block_mask = ~(block_size -1); int stat;
