Gast
#531754
Hallo,
ich schreibe setupdaten ins eeprom und lese diese beim programmstart
aus.
Ab und zu wird der letzte Wert der struct nicht geschrieben, weiß jemand
was ich dá falsch mache?
typedef UCHAR* PCHARU;
#define EEPROM_POS (PCHARU) 0x00
typedef struct
{
float sinkingTone,
climbingTone;
u08 timeOffset,
trackIntervall,
lautstaerke,
bluetooth,
sms,
config,
mode;
} SETUPBLOCK;
volatile SETUPBLOCK setupBlock;
void writesetupdata (void)
{
while(!eeprom_is_ready());
cli();
eeprom_write_block((u16*) &setupBlock,EEPROM_POS, sizeof(SETUPBLOCK));
sei();
}
void readsetupdata (void)
{
while(!eeprom_is_ready());
eeprom_read_block((u16*) &setupBlock,EEPROM_POS, sizeof(SETUPBLOCK));
}