Hallo Leute,
ich habe folgende Funktion:
1 | void ReadRTC(uint8_t *Year,uint8_t *Months,uint8_t *Day,uint8_t *Day_of_Weack,uint8_t *hour,uint8_t *minutes,uint8_t *scundes)
|
2 | {
|
3 | i2c_start_wait(DEV_RV8564+I2C_WRITE);
|
4 | i2c_write(2);
|
5 | i2c_rep_start(DEV_RV8564+I2C_READ);
|
6 | *scundes = i2c_readAck();
|
7 | *minutes = i2c_readAck();
|
8 | *hour = i2c_readAck();
|
9 | *Day = i2c_readAck()-1;
|
10 | *Day_of_Weack = i2c_readAck();
|
11 | *Months = i2c_readAck();
|
12 | *Year = i2c_readNak();
|
13 | }
|
und rufe diese Funktion in meiner main so auf
1 | typedef volatile struct // 15 Byte
|
2 | {
|
3 | uint8_t sekunde;
|
4 | uint8_t minute;
|
5 | uint8_t stunde;
|
6 | uint8_t Wochentag;
|
7 | uint8_t tag;
|
8 | uint8_t monat;
|
9 | uint8_t jahr;
|
10 | unsigned int crc;
|
11 | }rtc;
|
12 | rtc aktTime;
|
13 | while(1)
|
14 | {
|
15 | ReadRTC(&aktTime.jahr,&aktTime.monat,&aktTime.tag,&aktTime.Wochentag,&aktTime.stunde,&aktTime.minute,&aktTime.sekunde);
|
16 |
|
17 | }
|
und bekomme folgende Fehlermeldung
Warning 1 passing argument 1 of 'ReadRTC' discards 'volatile'
qualifier from pointer target type [enabled by default]
Warum?
Ich versteh nicht warum der Compiller von Volatile quatscht
Danke für Eure Hilfe!