Je nach gcc-Version hat's unterschiedliche Makros wie EEMEM.Code:#include <avr/eeprom.h> float afloat; const float float_ee __attribute__ ((section (".eeprom"))); void write_float (const float * pfloat) { eeprom_write_block (pfloat, &float_ee, sizeof (float)); } void foo () { write_float (&afloat); }
Lesezeichen