protected void SendCommand(BootloaderCommand command, BootloaderResponse response) { byte[] requestData = command.Serialize(); _channel.WriteData(requestData, requestData.Length); byte[] responseData = new byte[_channel.MaxTransferSize]; _channel.ReadData(responseData, responseData.Length); response.Deserialize(_checksumType, responseData); }