projects
/
pub
/
USBasp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6704136
)
Switch to using the correct intptr_t type use where a pointer must be cast to an...
author
Dean Camera
<dean@fourwalledcubicle.com>
Wed, 26 May 2010 12:24:44 +0000
(12:24 +0000)
committer
Dean Camera
<dean@fourwalledcubicle.com>
Wed, 26 May 2010 12:24:44 +0000
(12:24 +0000)
Bootloaders/CDC/BootloaderCDC.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/RNDISEthernet/Lib/DHCP.c
patch
|
blob
|
blame
|
history
Demos/Device/ClassDriver/RNDISEthernet/Lib/ICMP.c
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/RNDISEthernet/Lib/DHCP.c
patch
|
blob
|
blame
|
history
Demos/Device/LowLevel/RNDISEthernet/Lib/ICMP.c
patch
|
blob
|
blame
|
history
diff --git
a/Bootloaders/CDC/BootloaderCDC.c
b/Bootloaders/CDC/BootloaderCDC.c
index
b2a278e
..
0b2eb81
100644
(file)
--- a/
Bootloaders/CDC/BootloaderCDC.c
+++ b/
Bootloaders/CDC/BootloaderCDC.c
@@
-233,7
+233,7
@@
static void ReadWriteMemoryBlock(const uint8_t Command)
else
{
/* Read the next EEPROM byte into the endpoint */
else
{
/* Read the next EEPROM byte into the endpoint */
- WriteNextResponseByte(eeprom_read_byte((uint8_t*)(
uint16
_t)(CurrAddress >> 1)));
+ WriteNextResponseByte(eeprom_read_byte((uint8_t*)(
intptr
_t)(CurrAddress >> 1)));
/* Increment the address counter after use */
CurrAddress += 2;
/* Increment the address counter after use */
CurrAddress += 2;
@@
-275,7
+275,7
@@
static void ReadWriteMemoryBlock(const uint8_t Command)
else
{
/* Write the next EEPROM byte from the endpoint */
else
{
/* Write the next EEPROM byte from the endpoint */
- eeprom_write_byte((uint8_t*)(
uint16_t)(CurrAddress >> 1), FetchNextCommandByte());
+ eeprom_write_byte((uint8_t*)(
(intptr_t)(CurrAddress >> 1)), FetchNextCommandByte());
/* Increment the address counter after use */
CurrAddress += 2;
/* Increment the address counter after use */
CurrAddress += 2;
@@
-513,7
+513,7
@@
void CDC_Task(void)
else if (Command == 'D')
{
/* Read the byte from the endpoint and write it to the EEPROM */
else if (Command == 'D')
{
/* Read the byte from the endpoint and write it to the EEPROM */
- eeprom_write_byte((uint8_t*)((
uint16
_t)(CurrAddress >> 1)), FetchNextCommandByte());
+ eeprom_write_byte((uint8_t*)((
intptr
_t)(CurrAddress >> 1)), FetchNextCommandByte());
/* Increment the address after use */
CurrAddress += 2;
/* Increment the address after use */
CurrAddress += 2;
@@
-524,7
+524,7
@@
void CDC_Task(void)
else if (Command == 'd')
{
/* Read the EEPROM byte and write it to the endpoint */
else if (Command == 'd')
{
/* Read the EEPROM byte and write it to the endpoint */
- WriteNextResponseByte(eeprom_read_byte((uint8_t*)((
uint16
_t)(CurrAddress >> 1))));
+ WriteNextResponseByte(eeprom_read_byte((uint8_t*)((
intptr
_t)(CurrAddress >> 1))));
/* Increment the address after use */
CurrAddress += 2;
/* Increment the address after use */
CurrAddress += 2;
diff --git
a/Demos/Device/ClassDriver/RNDISEthernet/Lib/DHCP.c
b/Demos/Device/ClassDriver/RNDISEthernet/Lib/DHCP.c
index
e6377af
..
761c6ad
100644
(file)
--- a/
Demos/Device/ClassDriver/RNDISEthernet/Lib/DHCP.c
+++ b/
Demos/Device/ClassDriver/RNDISEthernet/Lib/DHCP.c
@@
-69,7
+69,7
@@
int16_t DHCP_ProcessDHCPPacket(void* IPHeaderInStart, void* DHCPHeaderInStart, v
DHCPHeaderOUT->ElapsedSeconds = 0;
DHCPHeaderOUT->Flags = DHCPHeaderIN->Flags;
DHCPHeaderOUT->YourIP = ClientIPAddress;
DHCPHeaderOUT->ElapsedSeconds = 0;
DHCPHeaderOUT->Flags = DHCPHeaderIN->Flags;
DHCPHeaderOUT->YourIP = ClientIPAddress;
- mem
cpy
(&DHCPHeaderOUT->ClientHardwareAddress, &DHCPHeaderIN->ClientHardwareAddress, sizeof(MAC_Address_t));
+ mem
move
(&DHCPHeaderOUT->ClientHardwareAddress, &DHCPHeaderIN->ClientHardwareAddress, sizeof(MAC_Address_t));
DHCPHeaderOUT->Cookie = SwapEndian_32(DHCP_MAGIC_COOKIE);
/* Alter the incoming IP packet header so that the corrected IP source and destinations are used - this means that
DHCPHeaderOUT->Cookie = SwapEndian_32(DHCP_MAGIC_COOKIE);
/* Alter the incoming IP packet header so that the corrected IP source and destinations are used - this means that
diff --git
a/Demos/Device/ClassDriver/RNDISEthernet/Lib/ICMP.c
b/Demos/Device/ClassDriver/RNDISEthernet/Lib/ICMP.c
index
2d81837
..
fa1a651
100644
(file)
--- a/
Demos/Device/ClassDriver/RNDISEthernet/Lib/ICMP.c
+++ b/
Demos/Device/ClassDriver/RNDISEthernet/Lib/ICMP.c
@@
-63,12
+63,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)));
diff --git
a/Demos/Device/LowLevel/RNDISEthernet/Lib/DHCP.c
b/Demos/Device/LowLevel/RNDISEthernet/Lib/DHCP.c
index
d3bffe9
..
eeed884
100644
(file)
--- a/
Demos/Device/LowLevel/RNDISEthernet/Lib/DHCP.c
+++ b/
Demos/Device/LowLevel/RNDISEthernet/Lib/DHCP.c
@@
-69,7
+69,7
@@
int16_t DHCP_ProcessDHCPPacket(void* IPHeaderInStart, void* DHCPHeaderInStart, v
DHCPHeaderOUT->ElapsedSeconds = 0;
DHCPHeaderOUT->Flags = DHCPHeaderIN->Flags;
DHCPHeaderOUT->YourIP = ClientIPAddress;
DHCPHeaderOUT->ElapsedSeconds = 0;
DHCPHeaderOUT->Flags = DHCPHeaderIN->Flags;
DHCPHeaderOUT->YourIP = ClientIPAddress;
- mem
cpy
(&DHCPHeaderOUT->ClientHardwareAddress, &DHCPHeaderIN->ClientHardwareAddress, sizeof(MAC_Address_t));
+ mem
move
(&DHCPHeaderOUT->ClientHardwareAddress, &DHCPHeaderIN->ClientHardwareAddress, sizeof(MAC_Address_t));
DHCPHeaderOUT->Cookie = SwapEndian_32(DHCP_MAGIC_COOKIE);
/* Alter the incoming IP packet header so that the corrected IP source and destinations are used - this means that
DHCPHeaderOUT->Cookie = SwapEndian_32(DHCP_MAGIC_COOKIE);
/* Alter the incoming IP packet header so that the corrected IP source and destinations are used - this means that
diff --git
a/Demos/Device/LowLevel/RNDISEthernet/Lib/ICMP.c
b/Demos/Device/LowLevel/RNDISEthernet/Lib/ICMP.c
index
02a401f
..
a43ffca
100644
(file)
--- a/
Demos/Device/LowLevel/RNDISEthernet/Lib/ICMP.c
+++ b/
Demos/Device/LowLevel/RNDISEthernet/Lib/ICMP.c
@@
-62,12
+62,12
@@
int16_t ICMP_ProcessICMPPacket(void* InDataStart, void* OutDataStart)
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)));