Refactor Atmel Studio binary blob internals to be more OO-like.
[pub/USBasp.git] / Demos / Host / LowLevel / RNDISEthernetHost / Lib / RNDISCommands.c
index 461c59e..3e3e074 100644 (file)
@@ -1,13 +1,13 @@
 /*
              LUFA Library
 /*
              LUFA Library
-     Copyright (C) Dean Camera, 2010.
+     Copyright (C) Dean Camera, 2013.
 
   dean [at] fourwalledcubicle [dot] com
 
   dean [at] fourwalledcubicle [dot] com
-      www.fourwalledcubicle.com
+           www.lufa-lib.org
 */
 
 /*
 */
 
 /*
-  Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+  Copyright 2013  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 
   Permission to use, copy, modify, distribute, and sell this
   software and its documentation for any purpose is hereby granted
 
   Permission to use, copy, modify, distribute, and sell this
   software and its documentation for any purpose is hereby granted
@@ -18,7 +18,7 @@
   advertising or publicity pertaining to distribution of the
   software without specific, written prior permission.
 
   advertising or publicity pertaining to distribution of the
   software without specific, written prior permission.
 
-  The author disclaim all warranties with regard to this
+  The author disclaims all warranties with regard to this
   software, including all implied warranties of merchantability
   and fitness.  In no event shall the author be liable for any
   special, indirect or consequential damages or any damages
   software, including all implied warranties of merchantability
   and fitness.  In no event shall the author be liable for any
   special, indirect or consequential damages or any damages
@@ -122,7 +122,7 @@ uint8_t RNDIS_SendKeepAlive(void)
        return HOST_SENDCONTROL_Successful;
 }
 
        return HOST_SENDCONTROL_Successful;
 }
 
-/** Initialises the attached RNDIS device's RNDIS interface.
+/** Initializes the attached RNDIS device's RNDIS interface.
  *
  *  \param[in] HostMaxPacketSize  Size of the packet buffer on the host
  *  \param[out] DeviceMaxPacketSize   Pointer to where the packet buffer size of the device is to be stored
  *
  *  \param[in] HostMaxPacketSize  Size of the packet buffer on the host
  *  \param[out] DeviceMaxPacketSize   Pointer to where the packet buffer size of the device is to be stored
@@ -198,7 +198,7 @@ uint8_t RNDIS_SetRNDISProperty(const uint32_t Oid,
        SetMessageData.SetMessage.InformationBufferOffset = (sizeof(RNDIS_Set_Message_t) - sizeof(RNDIS_Message_Header_t));
        SetMessageData.SetMessage.DeviceVcHandle = 0;
 
        SetMessageData.SetMessage.InformationBufferOffset = (sizeof(RNDIS_Set_Message_t) - sizeof(RNDIS_Message_Header_t));
        SetMessageData.SetMessage.DeviceVcHandle = 0;
 
-       memcpy(&SetMessageData.ContiguousBuffer, Buffer, Length);
+       memcpy(SetMessageData.ContiguousBuffer, Buffer, Length);
 
        if ((ErrorCode = RNDIS_SendEncapsulatedCommand(&SetMessageData,
                                                       SetMessageData.SetMessage.MessageLength)) != HOST_SENDCONTROL_Successful)
 
        if ((ErrorCode = RNDIS_SendEncapsulatedCommand(&SetMessageData,
                                                       SetMessageData.SetMessage.MessageLength)) != HOST_SENDCONTROL_Successful)
@@ -294,14 +294,15 @@ uint8_t RNDIS_GetPacketLength(uint16_t* const PacketLength)
 
        RNDIS_Packet_Message_t DeviceMessage;
 
 
        RNDIS_Packet_Message_t DeviceMessage;
 
-       if ((ErrorCode = Pipe_Read_Stream_LE(&DeviceMessage, sizeof(RNDIS_Packet_Message_t))) != PIPE_RWSTREAM_NoError)
+       if ((ErrorCode = Pipe_Read_Stream_LE(&DeviceMessage, sizeof(RNDIS_Packet_Message_t), NULL)) != PIPE_RWSTREAM_NoError)
        {
                return ErrorCode;
        }
 
        *PacketLength = (uint16_t)DeviceMessage.DataLength;
 
        {
                return ErrorCode;
        }
 
        *PacketLength = (uint16_t)DeviceMessage.DataLength;
 
-       Pipe_Discard_Stream(DeviceMessage.DataOffset - (sizeof(RNDIS_Packet_Message_t) - sizeof(RNDIS_Message_Header_t)));
+       Pipe_Discard_Stream(DeviceMessage.DataOffset - (sizeof(RNDIS_Packet_Message_t) - sizeof(RNDIS_Message_Header_t)),
+                           NULL);
 
        Pipe_Freeze();
 
 
        Pipe_Freeze();