optimisation: sound: use new eeprom_init function

Change in memory:
Flash: -18 bytes
SRAM: 0 bytes
This commit is contained in:
Guðni Már Gilbert 2023-02-09 19:31:23 +00:00 committed by DRracer
parent 8794ab2f71
commit c2a952cee5
2 changed files with 2 additions and 11 deletions

View File

@ -23,16 +23,8 @@ static void Sound_DoSound_Blind_Alert(void);
void Sound_Init(void)
{
SET_OUTPUT(BEEPER);
eSoundMode=(eSOUND_MODE)eeprom_read_byte((uint8_t*)EEPROM_SOUND_MODE);
if(eSoundMode==e_SOUND_MODE_NULL)
Sound_Default(); // je potreba provest i ulozeni do EEPROM
}
void Sound_Default(void)
{
eSoundMode=e_SOUND_MODE_DEFAULT;
Sound_SaveMode();
SET_OUTPUT(BEEPER);
eSoundMode = static_cast<eSOUND_MODE>(eeprom_init_default_byte((uint8_t*)EEPROM_SOUND_MODE, e_SOUND_MODE_DEFAULT));
}
void Sound_SaveMode(void)

View File

@ -34,7 +34,6 @@ extern eSOUND_MODE eSoundMode;
extern void Sound_Init(void);
extern void Sound_Default(void);
extern void Sound_CycleState(void);
extern void Sound_MakeSound(eSOUND_TYPE eSoundType);
extern void Sound_MakeCustom(uint16_t ms,uint16_t tone_ ,bool critical);