projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update changelogs for Debian build
[fw/altos]
/
src
/
ao_m25.c
diff --git
a/src/ao_m25.c
b/src/ao_m25.c
index afd5df760aaf1864b0aadb36ac2390957ffd561e..d7208273ff49714353e4992e323d1adc89c63528 100644
(file)
--- a/
src/ao_m25.c
+++ b/
src/ao_m25.c
@@
-18,16
+18,16
@@
#include "ao.h"
/* Total bytes of available storage */
#include "ao.h"
/* Total bytes of available storage */
-__
x
data uint32_t ao_storage_total;
+__
p
data uint32_t ao_storage_total;
/* Block size - device is erased in these units. At least 256 bytes */
/* Block size - device is erased in these units. At least 256 bytes */
-__
x
data uint32_t ao_storage_block;
+__
p
data uint32_t ao_storage_block;
/* Byte offset of config block. Will be ao_storage_block bytes long */
/* Byte offset of config block. Will be ao_storage_block bytes long */
-__
x
data uint32_t ao_storage_config;
+__
p
data uint32_t ao_storage_config;
/* Storage unit size - device reads and writes must be within blocks of this size. Usually 256 bytes. */
/* Storage unit size - device reads and writes must be within blocks of this size. Usually 256 bytes. */
-__
x
data uint16_t ao_storage_unit;
+__
p
data uint16_t ao_storage_unit;
/*
* Each flash chip is arranged in 64kB sectors; the
/*
* Each flash chip is arranged in 64kB sectors; the
@@
-99,8
+99,8
@@
static __xdata uint8_t ao_m25_mutex;
static __xdata uint8_t ao_m25_instruction[4];
static __xdata uint8_t ao_m25_instruction[4];
-#define M25_SELECT(cs)
(SPI_CS_PORT &= ~(cs)
)
-#define M25_DESELECT(cs)
(SPI_CS_PORT |= (cs)
)
+#define M25_SELECT(cs)
ao_spi_get_mask(SPI_CS_PORT,cs
)
+#define M25_DESELECT(cs)
ao_spi_put_mask(SPI_CS_PORT,cs
)
#define M25_BLOCK_SHIFT 16
#define M25_BLOCK 65536L
#define M25_BLOCK_SHIFT 16
#define M25_BLOCK 65536L