projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
builds, loads, runs, not very useful yet
[fw/altos]
/
src
/
stm
/
ao_flash_stm.c
diff --git
a/src/stm/ao_flash_stm.c
b/src/stm/ao_flash_stm.c
index c1648421cd61727f65bd0581aaac2e5d2fb7174b..38618bbe53165f64138c0a3a39fa81c2740cbf20 100644
(file)
--- a/
src/stm/ao_flash_stm.c
+++ b/
src/stm/ao_flash_stm.c
@@
-74,11
+74,10
@@
static void __attribute__ ((section(".ramtext"),noinline))
_ao_flash_erase_page(uint32_t *page)
{
stm_flash.pecr |= (1 << STM_FLASH_PECR_ERASE) | (1 << STM_FLASH_PECR_PROG);
_ao_flash_erase_page(uint32_t *page)
{
stm_flash.pecr |= (1 << STM_FLASH_PECR_ERASE) | (1 << STM_FLASH_PECR_PROG);
-
+
*page = 0x00000000;
*page = 0x00000000;
- while (stm_flash.sr & (1 << STM_FLASH_SR_BSY))
- ;
+ ao_flash_wait_bsy();
}
void
}
void
@@
-101,9
+100,8
@@
_ao_flash_half_page(uint32_t *dst, uint32_t *src)
stm_flash.pecr |= (1 << STM_FLASH_PECR_FPRG);
stm_flash.pecr |= (1 << STM_FLASH_PECR_PROG);
stm_flash.pecr |= (1 << STM_FLASH_PECR_FPRG);
stm_flash.pecr |= (1 << STM_FLASH_PECR_PROG);
-
- while (stm_flash.sr & (1 << STM_FLASH_SR_BSY))
- ;
+
+ ao_flash_wait_bsy();
for (i = 0; i < 32; i++) {
*dst++ = *src++;
for (i = 0; i < 32; i++) {
*dst++ = *src++;