optimisation: sound: use new eeprom_init function
Change in memory: Flash: -18 bytes SRAM: 0 bytes
This commit is contained in:
parent
8794ab2f71
commit
c2a952cee5
|
|
@ -23,16 +23,8 @@ static void Sound_DoSound_Blind_Alert(void);
|
||||||
|
|
||||||
void Sound_Init(void)
|
void Sound_Init(void)
|
||||||
{
|
{
|
||||||
SET_OUTPUT(BEEPER);
|
SET_OUTPUT(BEEPER);
|
||||||
eSoundMode=(eSOUND_MODE)eeprom_read_byte((uint8_t*)EEPROM_SOUND_MODE);
|
eSoundMode = static_cast<eSOUND_MODE>(eeprom_init_default_byte((uint8_t*)EEPROM_SOUND_MODE, e_SOUND_MODE_DEFAULT));
|
||||||
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();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sound_SaveMode(void)
|
void Sound_SaveMode(void)
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ extern eSOUND_MODE eSoundMode;
|
||||||
|
|
||||||
|
|
||||||
extern void Sound_Init(void);
|
extern void Sound_Init(void);
|
||||||
extern void Sound_Default(void);
|
|
||||||
extern void Sound_CycleState(void);
|
extern void Sound_CycleState(void);
|
||||||
extern void Sound_MakeSound(eSOUND_TYPE eSoundType);
|
extern void Sound_MakeSound(eSOUND_TYPE eSoundType);
|
||||||
extern void Sound_MakeCustom(uint16_t ms,uint16_t tone_ ,bool critical);
|
extern void Sound_MakeCustom(uint16_t ms,uint16_t tone_ ,bool critical);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue