Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/09/08 15:06
Read: times


 
#153066 - Accessor function just means get_eeprom(ads)
Responding to: ???'s previous message
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.

List of 9 messages in thread
TopicAuthorDate
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      

Back to Subject List