ParkingLotLust
Member
Hey guys. This past semester we learned to work with a dsPIC30F chip, so I decided to take up working on a project on an 18F2455, just cleaning up the code and fixing a couple bugs, and generally understanding the code better.
Here is the error Im getting (Im using MPLAB v8.43 and the LITE C18 compiler):
Here is the code causing the error. The line referenced in the error is the 'void XSPIWriteDWORD...' line:
Here is XSPIWrite:
and XSPIWriteDWORD is called here:
Now the one thing we didnt cover were pointers (I think that may be covered in later semesters) so I dont quite understand what a suspicious pointer conversion is. Can anyone help me out?
Here is the error Im getting (Im using MPLAB v8.43 and the LITE C18 compiler):
C:\Users\J Skoba\Desktop\Flasher GIT\picflash\XSPI.c:187:Warning [2054] suspicious pointer conversion
Here is the code causing the error. The line referenced in the error is the 'void XSPIWriteDWORD...' line:
Code:
void XSPIWriteDWORD(BYTE reg, DWORD data)
{
XSPIWrite(reg, &data);
}
Code:
void XSPIWrite(BYTE reg, BYTE *data)
{
PORTBbits.RB4 = 0; // SS
XSPIW((reg << 2) | 2);
for (i = 0; i < 4; i++)
XSPIW(*data++);
PORTBbits.RB4 = 1; // SS
}
and XSPIWriteDWORD is called here:
Code:
WORD XNANDErase(DWORD block)
{
...
XSPIWriteDWORD(0x0C, block << 9);
...
}
Now the one thing we didnt cover were pointers (I think that may be covered in later semesters) so I dont quite understand what a suspicious pointer conversion is. Can anyone help me out?
Last edited: