а по компиляции я такую уже писал - ее тоже еще раз приложу
Ок
Код: Выделить всё
if (nmenu == 4)
{
i2c_write(0x80 + p_tda[nmenu]);
i2c_write(0xA0 + 16 - p_tda[nmenu]);
}
if (nmenu == 5)
{
i2c_write(0xC0 + p_tda[nmenu]);
i2c_write(0xE0 + 16 - p_tda[nmenu]);
}
Код: Выделить всё
" Balans F dB",
" Balans R dB"
Код: Выделить всё
signed char x[6][16] = { { -78,-65,-55,-45,-40,-35,-30,-25,-20,-17,-14,-11,-8,-5,-2,0 },
{ 0,0,0,0,6,6,6,6,12,12,12,12,18,18,18,18 },
{ -14,-12,-10,-8,-6,-4,-2,0,0,2,4,6,8,10,12,14 },
{ -14,-12,-10,-8,-6,-4,-2,0,0,2,4,6,8,10,12,14 },
{ -17,-15,-12,-10,-7,-5,-2,0,2,5,7,10,12,15,17,20 },
{ -17,-15,-12,-10,-7,-5,-2,0,2,5,7,10,12,15,17,20 } };
Код: Выделить всё
i2c_write(0x80 + p_tda[nmenu]);
i2c_write(0xA0 + 16 - p_tda[nmenu]);
Код: Выделить всё
signed char x[8][16] = { { -78,-65,-55,-45,-40,-35,-30,-25,-20,-17,-14,-11,-8,-5,-2,0 },
{ 0,0,0,0,6,6,6,6,12,12,12,12,18,18,18,18 },
{ -14,-12,-10,-8,-6,-4,-2,0,0,2,4,6,8,10,12,14 },
{ -14,-12,-10,-8,-6,-4,-2,0,0,2,4,6,8,10,12,14 },
{ -17,-15,-12,-10,-7,-5,-2,0,0,0,0,0,0,0,0,0 },
{ 0,0,0,0,0,0,0,0,2,5,7,10,12,15,17,20 },
{ -17,-15,-12,-10,-7,-5,-2,0,0,0,0,0,0,0,0,0 },
{ 0,0,0,0,0,0,0,0,2,5,7,10,12,15,17,20 } };Код: Выделить всё
if (nmenu == 4)
{
i2c_write(0x80 + p_tda[4]);
i2c_write(0xA0 + 16 - p_tda[5]);
}
if (nmenu == 5)
{
i2c_write(0xC0 + p_tda[6]);
i2c_write(0xE0 + 16 - p_tda[7]);
}Код: Выделить всё
for (n = 0; n < 6; n++)Код: Выделить всё
for (n = 0; n < 8; n++)Код: Выделить всё
if ((reg == BALANS_F_MENU) || (reg == BALANS_R_MENU))Код: Выделить всё
if ((reg == BALANS_FL_MENU) || (reg == BALANS_FR_MENU) || (reg == BALANS_RL_MENU) || (reg == BALANS_RR_MENU))Код: Выделить всё
if (nmenu == 4)
{
i2c_write(0x80 + p_tda[nmenu]);
i2c_write(0xA0 + 16 - p_tda[nmenu]);
}
if (nmenu == 5)
{
i2c_write(0xC0 + p_tda[nmenu]);
i2c_write(0xE0 + 16 - p_tda[nmenu]);
}Код: Выделить всё
if (nmenu == 4)
{
i2c_write(0x80 + p_tda[nmenu]);
}
if (nmenu == 5)
{
i2c_write(0xA0 + p_tda[nmenu]);
}
if (nmenu == 6)
{
i2c_write(0xC0 + p_tda[nmenu]);
}
if (nmenu == 7)
{
i2c_write(0xE0 + p_tda[nmenu]);
}Код: Выделить всё
#define MENU_MAX 5
#ifdef ENGLISH
unsigned char *mainmenu[] = {
" Volume dB",
" Attens dB",
" Bass dB",
" Treble dB",
" Balans F dB",
" Balans R dB"
};
#else
unsigned char *mainmenu[] = {
"ЎpoјєocїД dB",
"©cё»eЅёe dB",
"TeјІp(H«) dB",
"TeјІp(B«) dB",
" a»aЅc(Є) dB",
" a»aЅc(T) dB"
};
#endif
#define VOLUME_MENU 0
#define ATTENS_MENU 1
#define BASS_MENU 2
#define TREBLE_MENU 3
#define BALANS_F_MENU 4
#define BALANS_R_MENU 5Код: Выделить всё
#define MENU_MAX 7
#ifdef ENGLISH
unsigned char *mainmenu[] = {
" Volume dB",
" Attens dB",
" Bass dB",
" Treble dB",
" Balans FL dB",
" Balans FR dB",
" Balans RL dB",
" Balans RR dB"
};
#else
unsigned char *mainmenu[] = {
"¡po¼ºoc¿Ä dB",
"©c¸»e½¸e dB",
"Te¼²p(H«) dB",
"Te¼²p(B«) dB",
" a»a½c(FL) dB",
" a»a½c(FR) dB",
" a»a½c(RL) dB",
" a»a½c(RR) dB"
};
#endif
#define VOLUME_MENU 0
#define ATTENS_MENU 1
#define BASS_MENU 2
#define TREBLE_MENU 3
#define BALANS_FL_MENU 4
#define BALANS_FR_MENU 5
#define BALANS_RL_MENU 6
#define BALANS_RR_MENU 7Код: Выделить всё
signed char x[6][16] = { { -78,-65,-55,-45,-40,-35,-30,-25,-20,-17,-14,-11,-8,-5,-2,0 },
{ 0,0,0,0,6,6,6,6,12,12,12,12,18,18,18,18 },
{ -14,-12,-10,-8,-6,-4,-2,0,0,2,4,6,8,10,12,14 },
{ -14,-12,-10,-8,-6,-4,-2,0,0,2,4,6,8,10,12,14 },
{ -17,-15,-12,-10,-7,-5,-2,0,2,5,7,10,12,15,17,20 },
{ -17,-15,-12,-10,-7,-5,-2,0,2,5,7,10,12,15,17,20 } };Код: Выделить всё
signed char x[8][16] = { { -78,-65,-55,-45,-40,-35,-30,-25,-20,-17,-14,-11,-8,-5,-2,0 },
{ 0,0,0,0,6,6,6,6,12,12,12,12,18,18,18,18 },
{ -14,-12,-10,-8,-6,-4,-2,0,0,2,4,6,8,10,12,14 },
{ -14,-12,-10,-8,-6,-4,-2,0,0,2,4,6,8,10,12,14 },
{ -17,-15,-12,-10,-7,-5,-2,0,2,5,7,10,12,15,17,20 },
{ -17,-15,-12,-10,-7,-5,-2,0,2,5,7,10,12,15,17,20 },
{ -17,-15,-12,-10,-7,-5,-2,0,2,5,7,10,12,15,17,20 },
{ -17,-15,-12,-10,-7,-5,-2,0,2,5,7,10,12,15,17,20 } };