diff options
author | meri <meri@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2007-04-10 17:34:53 +0000 |
---|---|---|
committer | meri <meri@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2007-04-10 17:34:53 +0000 |
commit | f21e08aa9f22d873e938cd3f021c3fc33d06d286 (patch) | |
tree | 16edb533cae24c19d3f0ee9c997f761a594e3009 /firmware/src/dfu/dfu.c | |
parent | 5492d0e34bec1c7b66b3781ce0e026c562336dfb (diff) |
moved flash code to seperate file
git-svn-id: https://svn.openpcd.org:2342/trunk@294 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'firmware/src/dfu/dfu.c')
-rw-r--r-- | firmware/src/dfu/dfu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/src/dfu/dfu.c b/firmware/src/dfu/dfu.c index 20778bd..58062a0 100644 --- a/firmware/src/dfu/dfu.c +++ b/firmware/src/dfu/dfu.c @@ -30,7 +30,7 @@ #include <dfu/dfu.h> #include <dfu/dbgu.h> -#include <dfu/flash.h> +#include <os/flash.h> #include <os/pcd_enumerate.h> #include "../openpcd.h" @@ -234,7 +234,7 @@ static int __dfufunc handle_dnload(u_int16_t val, u_int16_t len) dfu_state = DFU_STATE_dfuMANIFEST_SYNC; return RET_ZLP; } - if (ptr + len > (u_int8_t *) AT91C_IFLASH + AT91C_IFLASH_SIZE) { + if (ptr + len >= (u_int8_t *) AT91C_IFLASH + AT91C_IFLASH_SIZE - ENVIRONMENT_SIZE ) { DEBUGP("end of write exceeds flash end "); dfu_state = DFU_STATE_dfuERROR; dfu_status = DFU_STATUS_errADDRESS; |