Code: |
AS + 117 |
Symbolic: |
bccFlashDisk |
This command will manage special disk flashes (like compact flashes) for the connected device. Request parameters are the following:
Offset |
Type |
Label |
Description |
---|---|---|---|
0 |
U32 |
FLAGS |
Operating flags: |
4 |
U16 |
CMD |
Command: 0x0001 Create a new flash 0x0002 Delete an existing flash 0x0003 Clear the physical device, by deleting all contained flashes (or partitions) 0x0004 Backup an existing flash 0x0005 Restore an existing flash |
6 |
U8[32] |
DATA |
Command specific data |
38 |
STRZ |
NAME |
Flash name (0-termined) or physical device name. |
On success, a bccAck is received with the following data:
Offset |
Type |
Label |
Description |
---|---|---|---|
0 |
U8[32] |
DATA |
Command specific reply data |
On failure, a bccNack is received. Specific errors:
NACK code |
Description |
Extra data |
---|---|---|
nackIllegalArgs |
Illegal argument |
U16 What illegal: 1=Flags 2=Command 3=Flash/device name |
nackReadOnly |
The flash (or the device itself) is read-only and cannot be writtten. |
|
nackUnformattedDevice |
The flash (or the device itself) is not correctly formatted. |
|
For command 0x0001 (Create a new flash) request data is the following:
Offset |
Type |
Label |
Description |
---|---|---|---|
+0 |
U32 |
FLAGS |
Command flags: 0x00000001 Query only effective configuration 0x00000002 Overwrite existing flash |
+4 |
U32 |
SIZE |
Required flash size [kbyte] |
For command 0x0001 (Create a new flash) reply data is the following:
Offset |
Type |
Label |
Description |
---|---|---|---|
+0 |
U32 |
SIZE |
Effective flash size [kbyte] |
After the bccAck is received, the initialization operation will begin as soon as possible: when operation normally end you will receive a bccCompleted message (with no data). If operation is aborted from the device, you will receive a bccAborted.
Notes:
•Operation cannot be aborted by command, but only from remote.
•Both bccCompleted and bccAborted will have PID as request command PID.
During the operation you can optionally request the operation status by sending a bccCheck message (with no parameters): as DCH value you must use the SCH value from first bccAck message. The bccAck answer for a bccCheck, will contain following data:
Offset |
Type |
Label |
Description |
---|---|---|---|
0 |
U8 |
PERC |
Operation progress (%) |
1 |
STRZ |
MSG |
Optional status message |