Defines | |
#define | DATAFLASH_TOTALCHIPS |
#define | DATAFLASH_NO_CHIP DATAFLASH_CHIPCS_MASK |
#define | DATAFLASH_CHIP1 |
#define | DATAFLASH_CHIP2 |
#define | DATAFLASH_PAGE_SIZE |
#define | DATAFLASH_PAGES |
Functions | |
static void | Dataflash_SelectChipFromPage (const uint16_t PageAddress) |
static void | Dataflash_SendAddressBytes (uint16_t PageAddress, const uint16_t BufferByte) |
#define DATAFLASH_CHIP1 |
Mask for the first dataflash chip selected.
#define DATAFLASH_CHIP2 |
Mask for the second dataflash chip selected.
#define DATAFLASH_NO_CHIP DATAFLASH_CHIPCS_MASK |
Mask for no dataflash chip selected.
#define DATAFLASH_PAGE_SIZE |
Internal main memory page size for the board's dataflash ICs.
#define DATAFLASH_PAGES |
Total number of pages inside each of the board's dataflash ICs.
#define DATAFLASH_TOTALCHIPS |
Constant indicating the total number of dataflash ICs mounted on the selected board.
static void Dataflash_SelectChipFromPage | ( | const uint16_t | PageAddress | ) | [inline, static] |
Selects a dataflash IC from the given page number, which should range from 0 to ((DATAFLASH_PAGES * DATAFLASH_TOTALCHIPS) - 1). For boards containing only one dataflash IC, this will select DATAFLASH_CHIP1. If the given page number is outside the total number of pages contained in the boards dataflash ICs, all dataflash ICs are deselected.
PageAddress | Address of the page to manipulate, ranging from ((DATAFLASH_PAGES * DATAFLASH_TOTALCHIPS) - 1). |
static void Dataflash_SendAddressBytes | ( | uint16_t | PageAddress, | |
const uint16_t | BufferByte | |||
) | [inline, static] |
Sends a set of page and buffer address bytes to the currently selected dataflash IC, for use with dataflash commands which require a complete 24-byte address.
PageAddress | Page address within the selected dataflash IC | |
BufferByte | Address within the dataflash's buffer |