??? 04/09/08 18:50 Read: times |
#153074 - Fancy name for what I'm doing! Responding to: ???'s previous message |
David Prentice said:
unsigned char get_eeprom(unsigned short address);
void put_eeprom(unsigned short address, unsigned char value); The internals of these functions handle the slave address, register addressing etc. There is nothing C++ about this at all. You may well choose to have an error return from the put() function in case the chip is write protected. The advantage of a standard calling method is readability. You can implement the accessor as a real function or with a macro or inline function. David. Well in that case, I'm already there! I did find some info from Keil, but I don't see any real advantage to what they were doing, so I'll stick with what I have. tom |
Topic | Author | Date |
External EEPROM declarations | 01/01/70 00:00 | |
Don't know of any compiler ... | 01/01/70 00:00 | |
Use accessor functions for serial EEPROM | 01/01/70 00:00 | |
Accessor functions? | 01/01/70 00:00 | |
Accessor function just means get_eeprom(ads) | 01/01/70 00:00 | |
Fancy name for what I'm doing! | 01/01/70 00:00 | |
Nothing fancy - just common sense !![]() | 01/01/70 00:00 | |
There are compilers.... | 01/01/70 00:00 | |
me too said Keil | 01/01/70 00:00 |