??? 04/15/10 12:16 Read: times Msg Score: +1 +1 Good Answer/Helpful |
#175056 - Study your C textbooks Responding to: ???'s previous message |
Generic routines are normally written to accept uint8_t or uin16_t arguments. This covers the widest range of cases.
Then if you want to use a 'special' case, you cast your 'special' signed argument to the type of argument specified by the function prototype. Your textbooks will explain the rules for sign-extension etc for casting up or down. Compilers are becoming more pedantic about your use of types. So most <string.h> functions are going to specify that you use 'char' rather than 'signed char' or 'unsigned char'. It is VERY important that you understand when and where you should cast 'specials' or use the most appropriate type in the first place. David. |
Topic | Author | Date |
EEPROM Read/Write Issues | 01/01/70 00:00 | |
if it was an external EEPROM | 01/01/70 00:00 | |
if it was an external EEPROM | 01/01/70 00:00 | |
Special sequence. | 01/01/70 00:00 | |
Thanks, but can you please simplyfy it? | 01/01/70 00:00 | |
Hope this explains | 01/01/70 00:00 | |
Managed to fix lockups, but it doesnt read/write | 01/01/70 00:00 | |
You have to choose your API | 01/01/70 00:00 | |
Already did all that | 01/01/70 00:00 | |
char vs int | 01/01/70 00:00 | |
I gave you a function | 01/01/70 00:00 | |
Still no luck | 01/01/70 00:00 | |
unsigned int is not the size of the unsigned int* pointer | 01/01/70 00:00 | |
Why not use the function I gave you. | 01/01/70 00:00 | |
I did use you function | 01/01/70 00:00 | |
My apologies. | 01/01/70 00:00 | |
Sorry to keep dragging you back here... | 01/01/70 00:00 | |
FLIP is a pain | 01/01/70 00:00 | |
We have progress! | 01/01/70 00:00 | |
Terribly sorry to bump but I really need help | 01/01/70 00:00 | |
Found the solution! | 01/01/70 00:00 | |
Study your C textbooks | 01/01/70 00:00 | |
it cant distinguise the sign bit![]() | 01/01/70 00:00 |