|
DCT Lightfoot v3 API specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.dctl.hardware.flash.FlashMemory
Provide access to raw flash memory. Use of this class can be dangerous if running from flash or using a flash file system. This does not provide an input or output stream interface to discourage use in this way. The flash file system classes are much more suitable to use
| Constructor Summary | |
FlashMemory(int instance)
Create a new flash memory |
|
| Method Summary | |
void |
erase(int position)
Erase a block |
EraseRegion[] |
getEraseRegions()
Get the erase regions - a copy only |
int |
getPageSize()
Get the page size |
int |
getSize()
Get the memory size |
void |
lock(int position)
Lock a block |
int |
read(int position,
byte[] buf,
int offset,
int length)
Read a number of bytes from flash into a buffer |
void |
unlock(int position)
Unlock all the flash |
int |
write(int position,
byte[] buf,
int offset,
int length)
Write a number of bytes from a buffer into flash |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FlashMemory(int instance)
throws SystemException
instance - The instance to use
SystemException - if the flash cannot be opened| Method Detail |
public int read(int position,
byte[] buf,
int offset,
int length)
throws SystemException
position - The position to read frombuf - The bufferoffset - The offset into the bufferlength - The length to read
IOException - if there is an error reading
SystemException
public int write(int position,
byte[] buf,
int offset,
int length)
throws SystemException
position - The position to write tobuf - The bufferoffset - The offset into the bufferlength - The length to write
IOException - if there is an error reading
SystemException
public void erase(int position)
throws SystemException
position - The position of the block
SystemException - if there is an error erasing
public void lock(int position)
throws SystemException
position - The position of the block
SystemException - if there is an error locking
public void unlock(int position)
throws SystemException
SystemException - if there is an error unlockingpublic int getSize()
public int getPageSize()
public EraseRegion[] getEraseRegions()
|
DCT Lightfoot v3 API specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||