示例#1
0
        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);
        }
示例#2
0
        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);
        }