altos: Switch flash drivers __xdata to __pdata
authorKeith Packard <keithp@keithp.com>
Wed, 6 Jul 2011 22:52:25 +0000 (15:52 -0700)
committerKeith Packard <keithp@keithp.com>
Wed, 6 Jul 2011 22:52:25 +0000 (15:52 -0700)
Signed-off-by: Keith Packard <keithp@keithp.com>
src/ao.h
src/ao_ee.c
src/ao_flash.c
src/ao_intflash.c
src/ao_m25.c

index ac5615bb29b63d9a074438b3964c4abf2f67d1e7..e52a2198c4645eb3f45377f4f96dc4321521ec92 100644 (file)
--- a/src/ao.h
+++ b/src/ao.h
@@ -464,16 +464,16 @@ ao_mutex_put(__xdata uint8_t *ao_mutex) __reentrant;
  */
 
 /* Total bytes of available storage */
-extern __xdata uint32_t        ao_storage_total;
+extern __pdata uint32_t        ao_storage_total;
 
 /* Block size - device is erased in these units. At least 256 bytes */
-extern __xdata uint32_t        ao_storage_block;
+extern __pdata uint32_t        ao_storage_block;
 
 /* Byte offset of config block. Will be ao_storage_block bytes long */
-extern __xdata uint32_t        ao_storage_config;
+extern __pdata uint32_t        ao_storage_config;
 
 /* Storage unit size - device reads and writes must be within blocks of this size. Usually 256 bytes. */
-extern __xdata uint16_t ao_storage_unit;
+extern __pdata uint16_t ao_storage_unit;
 
 #define AO_STORAGE_ERASE_LOG   (ao_storage_config + AO_CONFIG_MAX_SIZE)
 
index e3b41103f56558e55fe1ca5b9f49f27c3384b726..83863af562af58bb6f9ff337fda21af8aec0ff4c 100644 (file)
 #define EE_DEVICE_SIZE ((uint32_t) 128 * (uint32_t) 1024)
 
 /* Total bytes of available storage */
-__xdata uint32_t       ao_storage_total;
+__pdata uint32_t       ao_storage_total;
 
 /* Block size - device is erased in these units. At least 256 bytes */
-__xdata uint32_t       ao_storage_block;
+__pdata uint32_t       ao_storage_block;
 
 /* Byte offset of config block. Will be ao_storage_block bytes long */
-__xdata uint32_t       ao_storage_config;
+__pdata uint32_t       ao_storage_config;
 
 /* Storage unit size - device reads and writes must be within blocks of this size. Usually 256 bytes. */
-__xdata uint16_t       ao_storage_unit;
+__pdata uint16_t       ao_storage_unit;
 
 /*
  * Using SPI on USART 0, with P1_2 as the chip select
index d323926fe209d310c2e27f3382259709664e9752..00e9639869cdf0a0a5b1345cbb3da4c22213c1ff 100644 (file)
 #include "at45db161d.h"
 
 /* Total bytes of available storage */
-__xdata uint32_t       ao_storage_total;
+__pdata uint32_t       ao_storage_total;
 
 /* Block size - device is erased in these units. At least 256 bytes */
-__xdata uint32_t       ao_storage_block;
+__pdata uint32_t       ao_storage_block;
 
 /* Byte offset of config block. Will be ao_storage_block bytes long */
-__xdata uint32_t       ao_storage_config;
+__pdata uint32_t       ao_storage_config;
 
 /* Storage unit size - device reads and writes must be within blocks of this size. Usually 256 bytes. */
-__xdata uint16_t       ao_storage_unit;
+__pdata uint16_t       ao_storage_unit;
 
 #define FLASH_CS               P1_1
 #define FLASH_CS_INDEX         1
index 88d1f7f6a96e97f99370ce2f485b2e779d80a5fe..d76d954e16a071f2cf7f924fd8ac676964f0673e 100644 (file)
 __xdata __at(AO_INTFLASH_LOCATION) uint8_t ao_intflash[AO_INTFLASH_SIZE];
 
 /* Total bytes of available storage */
-__xdata uint32_t       ao_storage_total = sizeof(ao_intflash);
+__pdata uint32_t       ao_storage_total = sizeof(ao_intflash);
 
 /* Block size - device is erased in these units. */
-__xdata uint32_t       ao_storage_block = AO_INTFLASH_BLOCK;
+__pdata uint32_t       ao_storage_block = AO_INTFLASH_BLOCK;
 
 /* Byte offset of config block. Will be ao_storage_block bytes long */
-__xdata uint32_t       ao_storage_config = sizeof(ao_intflash) - AO_INTFLASH_BLOCK;
+__pdata uint32_t       ao_storage_config = sizeof(ao_intflash) - AO_INTFLASH_BLOCK;
 
 /* Storage unit size - device reads and writes must be within blocks of this size. */
-__xdata uint16_t       ao_storage_unit = AO_INTFLASH_BLOCK;
+__pdata uint16_t       ao_storage_unit = AO_INTFLASH_BLOCK;
 
 __xdata static uint8_t  ao_intflash_dma_done;
 static uint8_t ao_intflash_dma;
index afd5df760aaf1864b0aadb36ac2390957ffd561e..208c69ba84677c9690b7f023487e92111b7aa530 100644 (file)
 #include "ao.h"
 
 /* Total bytes of available storage */
-__xdata uint32_t       ao_storage_total;
+__pdata uint32_t       ao_storage_total;
 
 /* Block size - device is erased in these units. At least 256 bytes */
-__xdata uint32_t       ao_storage_block;
+__pdata uint32_t       ao_storage_block;
 
 /* Byte offset of config block. Will be ao_storage_block bytes long */
-__xdata uint32_t       ao_storage_config;
+__pdata uint32_t       ao_storage_config;
 
 /* Storage unit size - device reads and writes must be within blocks of this size. Usually 256 bytes. */
-__xdata uint16_t       ao_storage_unit;
+__pdata uint16_t       ao_storage_unit;
 
 /*
  * Each flash chip is arranged in 64kB sectors; the