AT45 DataFlash(R) Definions. More...
Go to the source code of this file.
Defines | |
| #define | AT45_PAGE_ADDR_MASK ((1 << 13) - 1) |
| Mask for AT45 page address (13-bit). | |
| #define | AT45_PAGE_POS_MASK ((1 << 11) - 1) |
| Mask for AT45 page position (11-bit). | |
| #define | AT45_ATMEL_JEDEC_ID 0x1f |
| Atmel AT45 JEDEC ID. | |
| #define | AT45_DATAFLASH_FAMILY_CODE 0x20 |
| DataFlash familty code. | |
| #define | AT45_FAMILY_CODE_MASK 0xe0 |
| Mask for AT45 family code. | |
| #define | AT45_DENSITY_CODE_MIN 2 |
| Minimum AT45 density code. | |
| #define | AT45_DENSITY_CODE_MAX 8 |
| Maximum AT45 density code. | |
| #define | AT45_DENSITY_CODE_MASK 0x1f |
| Mask for AT45 density code. | |
| #define | AT45_DENSITY_CODE_0_DEVICE_SIZE 0x8000L |
| The device size in bytes for density code 0. | |
| #define | AT45_PAGE_SIZE_ID_0_SIZE 256 |
| The page size in bytes for page size id 0. | |
AT45 segmentation defines | |
| #define | AT45_PS_256 (0 << 0) |
| Page size 256 bytes. | |
| #define | AT45_PS_512 (1 << 0) |
| Page size 512 bytes. | |
| #define | AT45_PS_1024 (2 << 0) |
| Page size 1024 bytes. | |
| #define | AT45_PS_MASK (7 << 0) |
| Page size mask bits. | |
| #define | AT45_SS_128P (0 << 3) |
| Sector size 128 pages. | |
| #define | AT45_SS_256P (1 << 3) |
| Sector size 256 bytes. | |
| #define | AT45_SS_MASK (3 << 3) |
| Sector size mask bits. | |
| #define | AT45_DS_4S (0 << 4) |
| Device size 4 sectors. | |
| #define | AT45_DS_8S (1 << 4) |
| Device size 8 sectors. | |
| #define | AT45_DS_16S (2 << 4) |
| Device size 16 sectors. | |
| #define | AT45_DS_32S (3 << 4) |
| Device size 32 sectors. | |
| #define | AT45_DS_64S (4 << 4) |
| Device size 64 sectors. | |
| #define | AT45_DS_MASK (7 << 4) |
AT45 devices size information bitmask | |
| #define | AT45DB011D (AT45_PS_256 | AT45_SS_128P | AT45_DS_4S) |
| Size definitions for AT45DB011D. | |
| #define | AT45DB021D (AT45_PS_256 | AT45_SS_128P | AT45_DS_8S) |
| Size definitions for AT45DB021D. | |
| #define | AT45DB041D (AT45_PS_256 | AT45_SS_256P | AT45_DS_8S) |
| Size definitions for AT45DB031D. | |
| #define | AT45DB081D (AT45_PS_256 | AT45_SS_256P | AT45_DS_16S) |
| Size definitions for AT45DB081D. | |
| #define | AT45DB161D (AT45_PS_512 | AT45_SS_256P | AT45_DS_16S) |
| Size definitions for AT45DB161D. | |
| #define | AT45DB321D (AT45_PS_512 | AT45_SS_128P | AT45_DS_64S) |
| Size definitions for AT45DB321D. | |
| #define | AT45DB642D (AT45_PS_1024 | AT45_SS_256P | AT45_DS_32S) |
| Size definitions for AT45DB641D. | |
Enumerations | |
| enum | at45_cmd { AT45_CMD_CONTINOUS_ARRAY_READ = 0x0b, AT45_CMD_MAIN_MEMORY_TO_BUFFER_1_TRANSFER = 0x53, AT45_CMD_BUFFER_1_MAIN_MEMORY_PROGRAM_WITH_ERASE = 0x83, AT45_CMD_BUFFER_1_WRITE = 0x84, AT45_CMD_READ_ID = 0x9f, AT45_CMD_READ_STATUS_REG = 0xd7 } |
AT45 Commands. More... | |
| enum | at45_status_bit { AT45_STATUS_PAGE_SIZE = 0, AT45_STATUS_PROTECT = 1, AT45_STATUS_COMP = 6, AT45_STATUS_RDY = 7 } |
AT45 status register bits. More... | |
Functions | |
| static bool | at45_is_atmel_jedec_id (uint8_t manuf_id) |
| Test if AT45 mamufacturer ID is Atmel's. | |
| static bool | at45_is_dataflash_family_code (uint8_t device_id1) |
| Test if AT45 device ID is DataFlash family. | |
| static uint8_t | at45_get_density_code (uint8_t device_id1) |
| Get AT45 density code from Device ID 1. | |
| static bool | at45_is_valid_density_code (uint8_t device_id1) |
| Test if AT45 device ID have a valid density code. | |
| static bool | at45_is_valid_id (uint8_t manuf_id, uint8_t device_id1) |
| Test if AT45 device ID is DataFlash family. | |
| static uint32_t | at45_get_size (uint8_t device_id1) |
| Get AT45 device size from Device ID 1. | |
| static uint32_t | at45_get_page_size (uint8_t device_id1) |
| Get AT45 device page size from Device ID 1. | |
Variables | |
| static const uint8_t | at45_density_table [] |
| AT45 density code to device size information translation table. | |
AT45 DataFlash(R) Definions.
Copyright (C) 2009 Atmel Corporation. All rights reserved.
Definition in file at45.h.
1.6.3