Board specific Dataflash driver header for the Atmel EVK527.
Define Documentation
Mask for the first dataflash chip selected.
Mask for no dataflash chip selected.
Internal main memory page size for the board's dataflash IC.
Total number of pages inside the board's dataflash IC.
Constant indicating the total number of dataflash ICs mounted on the selected board.
Function Documentation
Deselects the current dataflash chip, so that no dataflash is selected.
Determines the currently selected dataflash chip.
- Returns:
- Mask of the currently selected Dataflash chip, either DATAFLASH_NO_CHIP if no chip is selected or a DATAFLASH_CHIPn mask (where n is the chip number).
Initializes the dataflash driver so that commands and data may be sent to an attached dataflash IC. The microcontroller's SPI driver MUST be initialized before any of the dataflash commands are used.
Sends a dummy byte to the currently selected dataflash IC, and returns the next byte from the dataflash.
- Returns:
- Last response byte from the dataflash
Selects the given dataflash chip.
- Parameters:
-
[in] | ChipMask | Mask of the Dataflash IC to select, in the form of DATAFLASH_CHIPn mask (where n is the chip number). |
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.
- Parameters:
-
[in] | PageAddress | Address of the page to manipulate, ranging from 0 to ((DATAFLASH_PAGES * DATAFLASH_TOTALCHIPS) - 1). |
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-bit address.
- Parameters:
-
[in] | PageAddress | Page address within the selected dataflash IC |
[in] | BufferByte | Address within the dataflash's buffer |
Sends a byte to the currently selected dataflash IC, and ignores the next byte from the dataflash.
- Parameters:
-
[in] | Byte | Byte of data to send to the dataflash |
Toggles the select line of the currently selected dataflash IC, so that it is ready to receive a new command.
Sends a byte to the currently selected dataflash IC, and returns a byte from the dataflash.
- Parameters:
-
[in] | Byte | Byte of data to send to the dataflash |
- Returns:
- Last response byte from the dataflash
Spin-loops while the currently selected dataflash is busy executing a command, such as a main memory page program or main memory to buffer transfer.