I have a number of #define commands in my current code.  I now need 
to provide for two or more possible definitions, depending upon the 
value of a particular eeprom byte.

For example, 
if eeprom byte #0x22 =0, define "Hysteresis" as 15
if eeprom byte #0x22 =1, define "Hysteresis" as 11

It seems to me that I have seen a one line function that would work 
for this where the "selection byte" would indicate a location in a 
following list of numbers, something kinda like this:

temp = I2C_EEPROM_read(0x00, 0x22);
#define Hysteresis (temp: 15,11,9)

Sorry if this is a 'no-brainer', but I'm really rusty & I'm just not 
coming up with anything in my C books...

Thx
Scott Kelley

Reply via email to