??? 02/04/09 17:36 Read: times |
#162061 - trans_byte buffer? Responding to: ???'s previous message |
Erik
So are you saying create a pointer to a code section array with those terms and index them with a pointer? trans_bytes[] = {byte0, byte1, ...byte6} uchar i2c_transmit(uchar address, *trans_bytes[0]) with the uchar MAX_NUMBYTE_TX[] variable passed in? I'm still not super clear on pointers or how this would work (but I understand the direction you want me to go). I've been reading Sams 21 day on pointers week 2 and C and the 8051, it makes sense, but nothing like what I'm trying to do here. So I guess I'm a bit confused on how the syntax should look.....<hangs head low> Chris |
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 |