avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] eeprom bytes swapped?


From: Harald Kipp
Subject: [avr-gcc-list] eeprom bytes swapped?
Date: Tue Jan 16 08:55:04 2001

Define:

char ee_str[] __attribute__ ((section(".eeprom"))) = "EEPROM String";
int ee_int __attribute__ ((section(".eeprom"))) = 0x1234;

All bytes are swapped. Printing the string using

ch = eeprom_rb((uint16_t)(&ee_str[i]))

for each character will print "EERPMOS rtni".

Reading the int

eeprom_rw((uint16_t)(&ee_int))

will return 0x3412.

What am I doing wrong?

Harald Kipp





reply via email to

[Prev in Thread] Current Thread [Next in Thread]