From d9bcf00f69313b6dd42346d6af340a1a9874ba9f Mon Sep 17 00:00:00 2001 From: Marcus Müller Date: Mon, 16 Jan 2017 15:54:57 +0100 Subject: made FX2 EEPROMS and firmware build with modern SDCC 3.6 --- firmware/fx2/b100/eeprom_io.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'firmware/fx2/b100/eeprom_io.c') diff --git a/firmware/fx2/b100/eeprom_io.c b/firmware/fx2/b100/eeprom_io.c index 9eeb53636..666f3f692 100644 --- a/firmware/fx2/b100/eeprom_io.c +++ b/firmware/fx2/b100/eeprom_io.c @@ -27,12 +27,12 @@ // returns non-zero if successful, else 0 unsigned char eeprom_read (unsigned char i2c_addr, unsigned char eeprom_offset, - xdata unsigned char *buf, unsigned char len) + __xdata unsigned char *buf, unsigned char len) { // We setup a random read by first doing a "zero byte write". // Writes carry an address. Reads use an implicit address. - static xdata unsigned char cmd[1]; + static __xdata unsigned char cmd[1]; cmd[0] = eeprom_offset; if (!i2c_write(i2c_addr, cmd, 1)) return 0; @@ -46,9 +46,9 @@ eeprom_read (unsigned char i2c_addr, unsigned char eeprom_offset, // returns non-zero if successful, else 0 unsigned char eeprom_write (unsigned char i2c_addr, unsigned char eeprom_offset, - const xdata unsigned char *buf, unsigned char len) + const __xdata unsigned char *buf, unsigned char len) { - static xdata unsigned char cmd[2]; + static __xdata unsigned char cmd[2]; unsigned char ok; while (len-- > 0){ -- cgit v1.2.3