460
Platforms
©2000-2008 Tibbo Technology Inc.
of the first 16-bit value, offset 2 -- high byte of the second 16-bit value, and so on.
.Close Method
Function:
Closes the file opened "on" a currently selected file
number (selection is made through the
).
Syntax:
fd.close() as pl_fd_status_codes
Returns:
One of the following
, also affects
:
0- PL_FD_STATUS_OK: Completed successfully.
1- PL_FD_STATUS_FAIL: Physical flash memory failure
(fatal).
See Also:
Details
Invoking the method also does the job performed by the
method (and
this is why the 1- PL_FD_STATUS_FAIL status code may be returned here).
Attempting to invoke this method "on" a file number that did not have any opened
file associated with it generates no error.
.Copyfirmware Method
Function:
Copies specified number of sectors, starting from logical
sector 0, into the firmware and Tibbo Basic area of the
flash memory, then reboots the device to make it run the
new firmware.
Syntax:
fd.copyfirmware(numsectors as word)
Returns:
---
See Also:
Upgrading the Firmware/Application
,
,
Part
Description
num
sect
ors
Number of sectors to copy.
Details
This method allows you to remotely upgrade the firmware and the Tibbo Basic
application of your device. First, your application can receive and store the new
firmware into the unused area of the flash memory (see
,
,
). Actual transmission of the firmware/application
can be implemented in any suitable way, for example, through a TCP/IP
connection. To upgrade itself, your application will then execute this method.
BE VERY CAREFUL!
Using the fd.copyfirmware on incorrect data will
"incapacitate" your device and further remote upgrades will become impossible.
463
472
472
448
466
452
458
468
472
457
479
483