Added untested support for erasing a specific portion of the SIMM

(in 256 KB increments). Won't be able to test it until I implement it in
the control software as well, but I think it should work.
This commit is contained in:
Doug Brown
2012-10-15 22:00:29 -07:00
parent d484d126e5
commit 7bbfc23c1a
4 changed files with 197 additions and 2 deletions

View File

@ -45,7 +45,8 @@ typedef enum ProgrammerCommand
SetSIMMTypePLCC32_2MB,
SetSIMMTypeLarger,
SetVerifyWhileWriting,
SetNoVerifyWhileWriting
SetNoVerifyWhileWriting,
ErasePortion
} ProgrammerCommand;
// After a command is sent, the programmer will always respond with
@ -166,4 +167,21 @@ typedef enum ComputerBootloaderEraseWriteRequest
ComputerBootloaderCancel
} ComputerBootloaderEraseWriteRequest;
// ------------------------- ERASE PORTION OF CHIP PROTOCOL -------------------------
// If the command is ErasePortion, the programmer will reply CommandReplyOK.
// Next, the program will send the beginning position to erase as a 4-byte little
// endian integer, followed by the length to erase as a 4-byte little endian
// integer. The programmer will reply with ProgrammerErasePortionOK to signify
// that the erase is beginning, followed by ProgrammerErasePortionFinished when
// everything is done.
// The length and position to erase must be on 256 KB boundaries and shouldn't
// go past the end of the selected type of chip. If any error occurs, it will
// reply with ProgrammerErasePortionError instead.
typedef enum ProgrammerErasePortionOfChipReply
{
ProgrammerErasePortionOK = 0,
ProgrammerErasePortionError,
ProgrammerErasePortionFinished
};
#endif /* PROGRAMMER_PROTOCOL_H_ */