| cmdTEADATA | Index |
Command Code:
The Packet:
| 0 | 1 | 2 | 3 | |||
| address | 2 | cmdTEADATA | Data Byte(s) |
| Data Byte(s) - | 1 to 7 bytes of data. |
Description:
This command writes data to a TEA file. The TEA file must be opened with the cmdTEAINIT command. The first read or write command for a newly opened TEA file determines its mode. There is no reply packet. Trying to read from a write-only TEA file will generate an error message. In the GP 1.0 module, trying to write more than 1022 bytes of data will generate an error message. The maximum file size is 1024 bytes (1K), but the first two bytes in a TEA file are reserved for the file size. The Moto 1.0 module has one 16K file slot. Trying to write more than 16382 bytes of data to this file will generate an error message.
Reply packets for the cmdTEAREAD command include the cmdTEADATA identifier.
The cmdTEADATA command can handle any number of data bytes, from 1 to 7. However, the EEPROM on a BrainStem has a 64-byte write buffer. Because of this, writes to a TEA file can not cross a 64-byte boundary. For example, if 63 bytes have been written to a TEA file, and 7 bytes remain to be written, those bytes must be split into two packets. The next packet must contain 1 data byte. The following packet may contain the 6 remaining data bytes.