??? 02/05/09 19:51 Read: times |
#162110 - Works great!...One question though Responding to: ???'s previous message |
My .c function using your definition as:
unsigned char i2c_transmit(unsigned char address, unsigned char *transmit_bytes, unsigned char MAX_NUMBYTE_TX[]) { //extern unsigned char byte1, byte2; // if already busy then return current status if (i2cstatus & I2C_BUSY) return i2cstatus; // now we are busy performing a transfer i2cstatus = I2C_BUSYTX; // store slave address + W for use in ISR slaveaddress = address << 1; // transmit start condition STA = 1; // transmission started return I2C_OK; } Give me a warning: I2C_MASTER.C(220): warning C280: 'transmit_bytes': unreferenced local variable I2C_MASTER.C(220): warning C280: 'MAX_NUMBYTE_TX': unreferenced local variable And that is really no big deal and correct since those two aren't being associated to pass parameters, so at this point, should I put a dummy equate to those two to shut the compiler up? I tried to do as I just mentioned by: unsigned char t1, t2; t1=*transmit_bytes[0]; t2=MAX_NUMBYTE_TX[0]; And the compiler didn't like that at all. Any suggestions to try to supress the known warning besides changing the warning level? |
Topic | Author | Date |
dynamic parameters in an I2C definition possible? | 01/01/70 00:00 | |
how about | 01/01/70 00:00 | |
trans_byte buffer? | 01/01/70 00:00 | |
something like: | 01/01/70 00:00 | |
Updated, but errors on my part | 01/01/70 00:00 | |
This | 01/01/70 00:00 | |
I must be stuck on stupid | 01/01/70 00:00 | |
I Think it is this | 01/01/70 00:00 | |
Array of pointers to characters | 01/01/70 00:00 | |
Try this code | 01/01/70 00:00 | |
Works great!...One question though | 01/01/70 00:00 | |
The warning is real | 01/01/70 00:00 | |
Not exactly as I coded | 01/01/70 00:00 | |
Update......Problem solved![]() | 01/01/70 00:00 |