8.8.1.1.1.2.8. Flash¶
- interface Flash()¶
- isFlashSupported()¶
Determines if flash is supported for the current device.
if (session.flash.isFlashSupported()) { // perform flash operations... }
- Returns:
true if flash is supported on the current device, false otherwise.
- Return type:
boolean
- performOperation(operation: string)¶
Performs the specified flash operation. A list of all available operations for the current device can be obtained by calling :js:meth:
~Flash.listSupportedOperations.// Erases the flash (assuming the operation is supported and named "Erase") session.flash.performOperation("Erase");
- Parameters:
operation (
string) -- The operation to be performed.
- Return type:
void
- listSupportedOperations()¶
Queries the list of flash operations supported for the current device.
// Print the list of supported operations console.log(session.flash.listSupportedOperations());
- Return type:
string
- multiLoadStart()¶
Should be called to start a multi-load operation. The flash manager will only erase the flash on the first program load. Once the Flash Manger receives this call, users will be free to call :js:meth:
~Memory.loadProgramand :js:meth:~Memory.loadBinaryProgramas many times as needed to write to the Flash.session.flash.multiLoadStart(); // multiple program loads... session.flash.multiLoadEnd();
- Return type:
void
- multiLoadEnd()¶
Called to finish a multi-load operation. The flash manager will return to default mode (erasing flash based on user settings).
session.flash.multiLoadStart(); // multiple program loads... session.flash.multiLoadEnd();
- Return type:
void