<< Previous | Next >> | |
|
int readUserBlock( void * dest, unsigned addr, unsigned numbytes );
Description
- Reads a number of bytes from the User block on the primary flash to a buffer in root memory. Please note that portions of the User block may be used by the BIOS for your board to store values. For example, any board with an A to D converter will require the BIOS to write calibration constants to the User block. For some versions of the BL2000 and the BL2100 this memory area is 0x1C00 to 0x1FFF. See the user's manual for your particular board for more information before overwriting any part of the User block. Also, see the Rabbit Microprocessor Designer's Handbook for more information on the User block.
Parameters
- dest
- Pointer to destination to copy data to.
- addr
- Address offset in User block to read from.
- numbytes
- Number of bytes to copy.
Return value
0
: Success
-1
: Invalid address or range
-2
: No valid ID block found (block version 3 or later)
- The return values below are applicable only if
_SPI_USE_UCOS_MUTEX
is not #defined:
-ETIME
: (Serial flash only, time out waiting for SPI)
postive N: (Serial flash only, SPI in use by device N)Library
- IDBLOCK.LIB
See also
- writeUserBlock, readUserBlockArray
Dynamic C Functions | << Previous | Next >> | rabbit.com |