mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-09-09 23:54:32 +00:00
Moved watchdog_periodic into the lowest level to avoid multiple redundant calls higher up
This commit is contained in:
parent
9ad02dbdd8
commit
1e69c4c795
@ -26,7 +26,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* @(#)$Id: xmem.c,v 1.1 2010/08/25 17:28:16 joxe Exp $
|
* @(#)$Id: xmem.c,v 1.2 2011/01/18 15:48:38 nifi Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -115,6 +115,7 @@ wait_ready(void)
|
|||||||
unsigned u;
|
unsigned u;
|
||||||
do {
|
do {
|
||||||
u = read_status_register();
|
u = read_status_register();
|
||||||
|
watchdog_periodic();
|
||||||
} while(u & 0x01); /* WIP=1, write in progress */
|
} while(u & 0x01); /* WIP=1, write in progress */
|
||||||
return u;
|
return u;
|
||||||
}
|
}
|
||||||
@ -259,14 +260,10 @@ xmem_erase(long size, unsigned long addr)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
watchdog_stop();
|
|
||||||
|
|
||||||
for (; addr < end; addr += XMEM_ERASE_UNIT_SIZE) {
|
for (; addr < end; addr += XMEM_ERASE_UNIT_SIZE) {
|
||||||
erase_sector(addr);
|
erase_sector(addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
watchdog_start();
|
|
||||||
|
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
Loading…
Reference in New Issue
Block a user