Class WriteFlashBuffer
java.lang.Object
uk.ac.manchester.spinnaker.messages.sdp.SpinnakerRequest
uk.ac.manchester.spinnaker.messages.scp.SCPRequest<T>
uk.ac.manchester.spinnaker.messages.bmp.BMPRequest<BMPRequest.BMPResponse>
uk.ac.manchester.spinnaker.messages.bmp.WriteFlashBuffer
- All Implemented Interfaces:
SerializableMessage
public class WriteFlashBuffer extends BMPRequest<BMPRequest.BMPResponse>
A request to write memory to flash on a BMP. Must have already been prepared
with
EraseFlash
. There is no response payload.
Calls cmd_flash_write()
in bmp_cmd.c
.
-
Nested Class Summary
Nested classes/interfaces inherited from class uk.ac.manchester.spinnaker.messages.bmp.BMPRequest
BMPRequest.BMPResponse, BMPRequest.PayloadedResponse<T>
-
Field Summary
Fields Modifier and Type Field Description static int
FLASH_CHUNK_SIZE
The size of chunk that will be transferred.Fields inherited from class uk.ac.manchester.spinnaker.messages.scp.SCPRequest
argument1, argument2, argument3, BOOT_CHIP, BOOT_MONITOR_CORE, data, NO_DATA, scpRequestHeader
-
Constructor Summary
Constructors Constructor Description WriteFlashBuffer(BMPBoard board, MemoryLocation baseAddress, boolean erase)
-
Method Summary
Modifier and Type Method Description BMPRequest.BMPResponse
getSCPResponse(ByteBuffer buffer)
Parse the response to this message.Methods inherited from class uk.ac.manchester.spinnaker.messages.sdp.SpinnakerRequest
getMessageData
-
Field Details
-
FLASH_CHUNK_SIZE
public static final int FLASH_CHUNK_SIZEThe size of chunk that will be transferred. Fixed.- See Also:
- Constant Field Values
-
-
Constructor Details
-
WriteFlashBuffer
- Parameters:
board
- the board with the BMP to write the flash ofbaseAddress
- The positive base address where the chunk is locatederase
- Whether to erase first
-
-
Method Details
-
getSCPResponse
Description copied from class:SCPRequest
Parse the response to this message.- Specified by:
getSCPResponse
in classSCPRequest<BMPRequest.BMPResponse>
- Parameters:
buffer
- The buffer to parse.- Returns:
- The message response.
- Throws:
Exception
- If anything goes wrong with parsing.
-