projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos/telelco-v3.0: Show backlight/contrast value as percent
[fw/altos]
/
src
/
stmf0
/
ao_storage_stm.c
diff --git
a/src/stmf0/ao_storage_stm.c
b/src/stmf0/ao_storage_stm.c
index 1a6198a79308cd66808629ec999521113ed3c2b6..4f5a12ef01d757a12c4e290bcb52c522c20d8438 100644
(file)
--- a/
src/stmf0/ao_storage_stm.c
+++ b/
src/stmf0/ao_storage_stm.c
@@
-70,7
+70,7
@@
stm_flash_page_size(void)
#define ao_flash_wait_bsy() do { while (stm_flash.sr & (1 << STM_FLASH_SR_BSY)); } while (0)
#define ao_flash_wait_bsy() do { while (stm_flash.sr & (1 << STM_FLASH_SR_BSY)); } while (0)
-static void __attribute__ ((section(".
ramtext"),
noinline))
+static void __attribute__ ((section(".
sdata2.flash"),
noinline))
_ao_flash_erase_page(uint16_t *page)
{
stm_flash.cr |= (1 << STM_FLASH_CR_PER);
_ao_flash_erase_page(uint16_t *page)
{
stm_flash.cr |= (1 << STM_FLASH_CR_PER);
@@
-86,7
+86,8
@@
_ao_flash_erase_page(uint16_t *page)
#define _ao_flash_addr(pos) ((uint16_t *) (void *) ((uint8_t *) __flash__ + (pos)))
#define _ao_flash_addr(pos) ((uint16_t *) (void *) ((uint8_t *) __flash__ + (pos)))
-static void __attribute ((section(".ramtext"), noinline)) _ao_flash_byte(uint32_t pos, uint8_t b)
+static void __attribute__ ((section(".sdata2.flash"), noinline))
+_ao_flash_byte(uint32_t pos, uint8_t b)
{
uint16_t v;
uint16_t *a = _ao_flash_addr(pos & ~1);
{
uint16_t v;
uint16_t *a = _ao_flash_addr(pos & ~1);
@@
-99,7
+100,7
@@
static void __attribute ((section(".ramtext"), noinline)) _ao_flash_byte(uint32_
ao_flash_wait_bsy();
}
ao_flash_wait_bsy();
}
-static void __attribute__ ((section(".
ramtext
"), noinline))
+static void __attribute__ ((section(".
sdata2.flash
"), noinline))
_ao_flash_write(uint32_t pos, void *sv, uint16_t len)
{
uint8_t *s = sv;
_ao_flash_write(uint32_t pos, void *sv, uint16_t len)
{
uint8_t *s = sv;
@@
-128,7
+129,7
@@
_ao_flash_write(uint32_t pos, void *sv, uint16_t len)
}
uint8_t
}
uint8_t
-ao_storage_erase(uint32_t pos)
+ao_storage_
device_
erase(uint32_t pos)
{
ao_arch_block_interrupts();
ao_flash_unlock();
{
ao_arch_block_interrupts();
ao_flash_unlock();
@@
-157,7
+158,7
@@
ao_storage_device_write(uint32_t pos, void *v, uint16_t len)
}
uint8_t
}
uint8_t
-ao_storage_device_read(uint32_t pos,
__xdata void *d, uint16_t len) __reentrant
+ao_storage_device_read(uint32_t pos,
void *d, uint16_t len)
{
if (pos >= ao_storage_total || pos + len > ao_storage_total)
return 0;
{
if (pos >= ao_storage_total || pos + len > ao_storage_total)
return 0;
@@
-166,7
+167,7
@@
ao_storage_device_read(uint32_t pos, __xdata void *d, uint16_t len) __reentrant
}
void
}
void
-ao_storage_flush(void)
__reentrant
+ao_storage_flush(void)
{
}
{
}
@@
-179,10
+180,10
@@
ao_storage_setup(void)
}
void
}
void
-ao_storage_device_info(void)
__reentrant
+ao_storage_device_info(void)
{
{
- printf ("Using internal flash, page %
d bytes, total %
d bytes\n",
-
ao_storage_block,
ao_storage_total);
+ printf ("Using internal flash, page %
ld bytes, total %l
d bytes\n",
+
(long) ao_storage_block, (long)
ao_storage_total);
}
void
}
void