so i started learning avr-c programming a few weeks ago and i'm a little confused about using the eeprom so save values.
i've been working a snake game for my project, and i need to save everything at any point to the eeprom so that the user can load it from that spot again.
but first i've been receiving warnings in regard to the way i've been trying to save the the highscore
those are the only 2 instances where i've actually written to eeprom so far.
and it works so far, without any problems to the game, but the problem is i've been getting warnings saying.
and i don't know how to fix the code.
any help would be appreciated
thanks,
phoenix1990
i've been working a snake game for my project, and i need to save everything at any point to the eeprom so that the user can load it from that spot again.
but first i've been receiving warnings in regard to the way i've been trying to save the the highscore
Code:
#include <avr/eeprom.h>
eeprom_write_word(1, hiscore);
printf("Current High-Score: %d\n", eeprom_read_word(1));
and it works so far, without any problems to the game, but the problem is i've been getting warnings saying.
Code:
warning: passing argument 1 of 'eeprom_read_word' makes pointer from integer without a cast warning: passing argument 1 of 'eeprom_write_word' makes pointer from integer without a cast
any help would be appreciated
thanks,
phoenix1990
Comment