Fixes an issue with the rom-plugin device firmware that is used by BitBurner and otp_burner tools to program fuses. These tools are part of IMX_OTP_TOOLS package.
The plugin was failing to check the status whether the data packets have been received or not.
As such, at times before receiving data from host the firmware was processing the usb buffer
with previously sent or received data resulting in incorrect values being programmed. To fix
this issue we modified the firmware to make sure we receive the data before processing the usb buffer.
Here is the sequence of usb transfers (protocol):
1. Cmd-phase: Host send cmd to write to otp register with cmd type, register index and number of registers to write
2. Data-phase: Host send data for values to write to otp register.
3. Status-phase: Device sends status to host
4. Cmd-phase: Host send cmd to read otp register to verify data written was correct
5. Data-phase: Device send data from otp registers
6. Status-phase: Device sends status to host
The problem was at #2 wherein device would process usb buffer before confirming whether data has received or not.