summaryrefslogtreecommitdiff
path: root/src/at45db161d.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-01-09 20:42:57 -0800
committerKeith Packard <keithp@keithp.com>2010-01-09 20:42:57 -0800
commit05bb953830604721c9a49dd56256b86f3666b5ff (patch)
treeacb7f320195d5bef3b034ab742e9f6a1bf2e3cbb /src/at45db161d.h
parent327e5e782958e516a7b7a786ab6c176b0decb8b8 (diff)
Don't set ao_flash_setup_done until we're actually done.
Because we're accessing this variable outside of the mutex, we need to make sure it isn't set until the data it covers has been initialized. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/at45db161d.h')
-rw-r--r--src/at45db161d.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/at45db161d.h b/src/at45db161d.h
index 66869733..8b72e647 100644
--- a/src/at45db161d.h
+++ b/src/at45db161d.h
@@ -28,7 +28,7 @@
#define FLASH_BLOCK_SIZE_MAX 512
#define FLASH_BLOCK_SHIFT (ao_flash_block_shift)
-#define FLASH_BLOCK_SIZE (1 << FLASH_BLOCK_SHIFT)
+#define FLASH_BLOCK_SIZE (ao_flash_block_size)
#define FLASH_BLOCK_MASK (FLASH_BLOCK_SIZE - 1)
#define FLASH_DEVICE_SIZE (ao_flash_device_size)
#define FLASH_DATA_SIZE (FLASH_DEVICE_SIZE - (uint32_t) FLASH_BLOCK_SIZE)