예제 #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);
        }