Hallo zusammen,
ich habe ein Problem mit dem Verständnis der Funktion
"eeprom_read_block" und "eeprom_write_block". Ich muss eine Struktur ins
EEPROM schreiben und rauslesen. Einzelne Bytes ins EEPROM schreiben hat
bei mir funktioniert, aber ich glaube ich habe den Syntax noch nicht
ganz verstanden um einen ganzen
Block (struct) zu schreiben:
So sieht mein Programm aus.
1 | typedef struct {
|
2 | int8_t unused;
|
3 | int8_t csCalbOUT1;
|
4 | int8_t csCalbOUT2;
|
5 | int8_t csCalbOUT3;
|
6 | int8_t csCalbOUT4;
|
7 | int8_t csCalbOUT5;
|
8 | int8_t csCalbOUT6;
|
9 | int8_t csCalbOUT7;
|
10 | int8_t csCalbOUT8;
|
11 | int8_t csCalbOUT9;
|
12 | int8_t csCalbOUT10;
|
13 | int8_t csCalbOUT11;
|
14 | int8_t csCalbOUT12;
|
15 | int8_t csCalbOUT13;
|
16 | int8_t csCalbOUT14;
|
17 | int8_t csCalbOUT15;
|
18 | int8_t csCalbOUT16;
|
19 | int8_t TOffset;
|
20 | } eeprom_calbData;
|
21 |
|
22 | eeprom_calbData EEMEM;
|
23 |
|
24 | int8_t CalbData[18];
|
25 |
|
26 | int main(void)
|
27 | {
|
28 |
|
29 | eeprom_read_block(&CalbData, eeprom_calbData, sizeof(CalbData));
|
30 |
|
31 | while(1)
|
32 | {
|
33 |
|
34 | //Programm
|
35 | }
|
36 | }
|
Ich bekomme folgende Fehler raus wenn ich kompiliere:
1. too few arguments to function 'eeprom_read_block'
2. expected expression before 'eeprom_calbData'
Ich habe schon unzählige Sachen ausprobiert aus dem GOOGLE leider ohne
Erfolg.
Kann mir einer Helfen?
Grus Stefan