projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos: Stop doing pointer arith on void *
[fw/altos]
/
src
/
kernel
/
ao_storage.c
diff --git
a/src/kernel/ao_storage.c
b/src/kernel/ao_storage.c
index 890bdcae9af991b457d018b69b179d5d72828de4..cfd116f9791bc536ae2e5709ddc066a3d84f3d8e 100644
(file)
--- a/
src/kernel/ao_storage.c
+++ b/
src/kernel/ao_storage.c
@@
-20,11
+20,9
@@
#include <ao_storage.h>
uint8_t
#include <ao_storage.h>
uint8_t
-ao_storage_read(ao_pos_t pos, void *buf, uint16_t len)
+ao_storage_read(ao_pos_t pos, void *
v_
buf, uint16_t len)
{
{
-#ifdef CC1111
- return ao_storage_device_read(pos, buf, len);
-#else
+ uint8_t *buf = v_buf;
uint16_t this_len;
uint16_t this_off;
uint16_t this_len;
uint16_t this_off;
@@
-50,15
+48,12
@@
ao_storage_read(ao_pos_t pos, void *buf, uint16_t len)
pos += this_len;
}
return 1;
pos += this_len;
}
return 1;
-#endif
}
uint8_t
}
uint8_t
-ao_storage_write(ao_pos_t pos, void *buf, uint16_t len)
+ao_storage_write(ao_pos_t pos, void *
v_
buf, uint16_t len)
{
{
-#ifdef CC1111
- return ao_storage_device_write(pos, buf, len);
-#else
+ uint8_t *buf = v_buf;
uint16_t this_len;
uint16_t this_off;
uint16_t this_len;
uint16_t this_off;
@@
-84,7
+79,6
@@
ao_storage_write(ao_pos_t pos, void *buf, uint16_t len)
pos += this_len;
}
return 1;
pos += this_len;
}
return 1;
-#endif
}
static uint8_t storage_data[128];
}
static uint8_t storage_data[128];
@@
-143,7
+137,7
@@
ao_storage_store(void)
}
#endif
}
#endif
-void
+
static
void
ao_storage_zap(void)
{
uint32_t v = ao_cmd_hex();
ao_storage_zap(void)
{
uint32_t v = ao_cmd_hex();
@@
-152,7
+146,7
@@
ao_storage_zap(void)
ao_storage_erase((uint32_t) v << 8);
}
ao_storage_erase((uint32_t) v << 8);
}
-void
+
static
void
ao_storage_zapall(void)
{
uint32_t pos;
ao_storage_zapall(void)
{
uint32_t pos;
@@
-312,7
+306,7
@@
ao_storage_test(void)
}
#endif /* AO_STORAGE_TEST */
}
#endif /* AO_STORAGE_TEST */
-void
+
static
void
ao_storage_info(void)
{
ao_storage_setup();
ao_storage_info(void)
{
ao_storage_setup();