X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Fkernel%2Fao_beep.h;h=085dd5b12f42d27ff27745eb6adf4c4ba81bcad2;hp=55f6117155fd3001a64c2fa6215676d9467827bf;hb=1085ec5d57e0ed5d132f2bbdac1a0b6a32c0ab4a;hpb=24167015705ae831692b95735968b04a876f935e diff --git a/src/kernel/ao_beep.h b/src/kernel/ao_beep.h index 55f61171..085dd5b1 100644 --- a/src/kernel/ao_beep.h +++ b/src/kernel/ao_beep.h @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of @@ -18,6 +19,12 @@ #ifndef _AO_BEEP_H_ #define _AO_BEEP_H_ +#ifndef HAS_BEEP_CONFIG +#if defined(USE_EEPROM_CONFIG) && USE_EEPROM_CONFIG || HAS_EEPROM +#define HAS_BEEP_CONFIG 1 +#endif +#endif + /* * ao_beep.c */ @@ -28,9 +35,16 @@ * frequency = 1/2 (24e6/32) / beep */ -#define AO_BEEP_LOW 150 /* 2500Hz */ -#define AO_BEEP_MID 94 /* 3989Hz */ -#define AO_BEEP_HIGH 75 /* 5000Hz */ +#define AO_BEEP_MID_DEFAULT 94 /* 3989Hz */ + +#if HAS_BEEP_CONFIG +#define AO_BEEP_MID ao_config.mid_beep +#else +#define AO_BEEP_MID AO_BEEP_MID_DEFAULT +#endif +#define AO_BEEP_LOW AO_BEEP_MID * 150 / 94 /* 2500Hz */ +#define AO_BEEP_HIGH AO_BEEP_MID * 75 / 94 /* 5000Hz */ + #define AO_BEEP_OFF 0 /* off */ #define AO_BEEP_g 240 /* 1562.5Hz */