Hi there!
I have yet another question:
How do I declare a "generic" pointer in codewarrior?
For example:
How should I declare
unsigned int * pTxData;
So that I can use it to point to data memory as well as program memory? Bare with me....
I have a macro:
#define mPktSend(_cmd, _pdata, _size) {uTxCmd = _cmd; pTxData = _pdata; uTxCnt = _size;}
I want to be able to use this macro to send data both from data and program memory locations.
mPktSend(0x00, uPktTxBuf, 1); //uPktTxBuf is in data memory. Right now this works just fine.
And at the same time be able to use it as:
mPktSend(0x02, (__pmem unsigned int *)(uPrgmAddr), 16); //send 16 bytes from program memory location beginning in uPrgmAddr - declared as unsigned int uPrgmAddr;
Right now this gives me an error. Doesnt like the fact I am sending a __pmem location to the macro.
Thank you!