projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix incorrectly named configuration descriptor callback routines in the host mode...
[pub/USBasp.git]
/
Demos
/
Device
/
ClassDriver
/
RNDISEthernet
/
Lib
/
ICMP.c
diff --git
a/Demos/Device/ClassDriver/RNDISEthernet/Lib/ICMP.c
b/Demos/Device/ClassDriver/RNDISEthernet/Lib/ICMP.c
index
2d81837
..
fec74b3
100644
(file)
--- a/
Demos/Device/ClassDriver/RNDISEthernet/Lib/ICMP.c
+++ b/
Demos/Device/ClassDriver/RNDISEthernet/Lib/ICMP.c
@@
-46,7
+46,9
@@
*
* \return The number of bytes written to the out Ethernet frame if any, NO_RESPONSE otherwise
*/
*
* \return The number of bytes written to the out Ethernet frame if any, NO_RESPONSE otherwise
*/
-int16_t ICMP_ProcessICMPPacket(Ethernet_Frame_Info_t* FrameIN, void* InDataStart, void* OutDataStart)
+int16_t ICMP_ProcessICMPPacket(Ethernet_Frame_Info_t* const FrameIN,
+ void* InDataStart,
+ void* OutDataStart)
{
ICMP_Header_t* ICMPHeaderIN = (ICMP_Header_t*)InDataStart;
ICMP_Header_t* ICMPHeaderOUT = (ICMP_Header_t*)OutDataStart;
{
ICMP_Header_t* ICMPHeaderIN = (ICMP_Header_t*)InDataStart;
ICMP_Header_t* ICMPHeaderOUT = (ICMP_Header_t*)OutDataStart;
@@
-63,12
+65,12
@@
int16_t ICMP_ProcessICMPPacket(Ethernet_Frame_Info_t* FrameIN, void* InDataStart
ICMPHeaderOUT->Id = ICMPHeaderIN->Id;
ICMPHeaderOUT->Sequence = ICMPHeaderIN->Sequence;
ICMPHeaderOUT->Id = ICMPHeaderIN->Id;
ICMPHeaderOUT->Sequence = ICMPHeaderIN->Sequence;
-
uint16_t DataSize = FrameIN->FrameLength - ((((uint16_t)InDataStart + sizeof(ICMP_Header_t)) - (uint16
_t)FrameIN->FrameData));
+
intptr_t DataSize = FrameIN->FrameLength - ((((intptr_t)InDataStart + sizeof(ICMP_Header_t)) - (intptr
_t)FrameIN->FrameData));
/* Copy the remaining payload to the response - echo requests should echo back any sent data */
/* Copy the remaining payload to the response - echo requests should echo back any sent data */
- mem
cpy
(&((uint8_t*)OutDataStart)[sizeof(ICMP_Header_t)],
- &((uint8_t*)InDataStart)[sizeof(ICMP_Header_t)],
- DataSize);
+ mem
move
(&((uint8_t*)OutDataStart)[sizeof(ICMP_Header_t)],
+
&((uint8_t*)InDataStart)[sizeof(ICMP_Header_t)],
+
DataSize);
ICMPHeaderOUT->Checksum = Ethernet_Checksum16(ICMPHeaderOUT, (DataSize + sizeof(ICMP_Header_t)));
ICMPHeaderOUT->Checksum = Ethernet_Checksum16(ICMPHeaderOUT, (DataSize + sizeof(ICMP_Header_t)));