|  | |
| << Previous | Next >> | |
|  | |
int flash_init( FlashDescriptor * fd, int mb3cr );
Description
- Initializes an internal data structure of type
FlashDescriptorwith information about the flash memory chip. The Memory Interface Unit bank register (MB3CR) will be assigned the value ofmb3crwhenever a function accesses the flash memory referenced byfd. See the Rabbit 2000 Users Manual for the correct chip select and wait state settings.
NOTE Use WriteFlash()to write to the primary flash memory.Parameters
- fd
- This is a pointer to an internal data structure that holds information about a flash memory chip.
- mb3cr
- This is the value to set MB3CR to whenever the flash memory is accessed. 0xc2 (i.e., CS2, /OE0, /WE0, 0 WS) is a typical setting for the second flash memory on the TCP/IP Dev Kit, the Intellicom, the Advanced Ethernet Core, and the RabbitLink.
Return value
0: Success.
1: Invalid flash memory type.
-1: Attempt made to initialize primary flash memory.Library
- FLASH.LIB
See also
- flash_erasechip, flash_erasesector, flash_gettype, flash_read, flash_readsector, flash_sector2xwindow, flash_writesector
| Dynamic C Functions | << Previous | Next >> | rabbit.com |