Signed-off-by: Keith Packard <keithp@keithp.com>
*/
/* Total bytes of available storage */
*/
/* 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 */
/* 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 */
/* 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. */
/* 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)
#define AO_STORAGE_ERASE_LOG (ao_storage_config + AO_CONFIG_MAX_SIZE)
#define EE_DEVICE_SIZE ((uint32_t) 128 * (uint32_t) 1024)
/* Total bytes of available storage */
#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 */
/* 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 */
/* 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. */
/* 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
/*
* Using SPI on USART 0, with P1_2 as the chip select
#include "at45db161d.h"
/* Total bytes of available storage */
#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 */
/* 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 */
/* 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. */
/* 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
#define FLASH_CS P1_1
#define FLASH_CS_INDEX 1
__xdata __at(AO_INTFLASH_LOCATION) uint8_t ao_intflash[AO_INTFLASH_SIZE];
/* Total bytes of available storage */
__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. */
/* 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 */
/* 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. */
/* 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;
__xdata static uint8_t ao_intflash_dma_done;
static uint8_t ao_intflash_dma;
#include "ao.h"
/* Total bytes of available storage */
#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 */
/* 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 */
/* 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. */
/* 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
/*
* Each flash chip is arranged in 64kB sectors; the