[cc65] How to write drivers?

From: Karri Kaksonen <karri1sipo.fi>
Date: 2011-04-23 13:24:26
Hi,

I have a small problem regarding EEPROM drivers.
There are many kind of I2C chips on the market and I would like to
implement just one call for reading and writing.

unsigned __fastcall__ lynx_eeread(unsigned addr);
void __fastcall__ lynx_eewrite(unsigned addr, unsigned val);

Currently I have 3 different chips 93C46, 93C66 and 93C86.

I tried to do:

eeprom46.s:
  export __93C46__: absolute = 1

eeprom66.s:
  export __93C66__: absolute = 1

eeprom86.s:
  export __93C86__: absolute = 1

In the config file I could then choose the kind of board I want to
compile for:

SYMBOLS {
  __93C86__: type = import;
}

A nice idea but it just does not work. The linker imports the eeprom66.s
always and if I specify __93C86__ then I get conflicts.

Ideas?

--
Karri


----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sat Apr 23 13:24:45 2011

This archive was generated by hypermail 2.1.8 : 2011-04-23 13:24:47 CEST