- Tue Jul 26, 2005 10:06 am
#6326
Hi All,
I was converting the free TI MSP430 TCP/IP project to the latest IAR430 V3.30A. However I have hit a problem, I get an error compiling:
I was converting the free TI MSP430 TCP/IP project to the latest IAR430 V3.30A. However I have hit a problem, I get an error compiling:
Code: Select all
And so I thought to split the line:
// copies bytes from MCU-memory to frame port
// NOTES: * an odd number of byte may only be transfered
// if the frame is written to the end!
// * MCU-memory MUST start at word-boundary
void CopyToFrame8900(void *Source, unsigned int Size)
{
P5DIR = 0xFF; // data port to output
while (Size > 1) {
WriteFrame8900(*((unsigned int *)Source)++);
Size -= 2;
}
if (Size) // if odd num. of bytes...
WriteFrame8900(*(unsigned char *)Source);
} // ignores the highbyte)
Code: Select all
To:WriteFrame8900(*((unsigned int *)Source)++);
Code: Select all
Because it seemed a bit crazy! The problem is that it is a void type data pointer which needs to be incremented by one.… I will get the project uploaded in a bit.....WriteFrame8900(*(unsigned int *)Source);
Source++;