添加开机延时
This commit is contained in:
parent
8eef0ec399
commit
41ca46e68f
@ -133,7 +133,6 @@ static void start_timer(void)
|
|||||||
__this->timer = sys_timer_add(NULL, led_tim_callback, 100);
|
__this->timer = sys_timer_add(NULL, led_tim_callback, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void user_eq_tre(int freq, int gain)
|
void user_eq_tre(int freq, int gain)
|
||||||
{
|
{
|
||||||
struct high_bass parm = {0};
|
struct high_bass parm = {0};
|
||||||
@ -152,11 +151,20 @@ void user_eq_bass(int freq, int gain)
|
|||||||
mix_out_high_bass(AUDIO_EQ_BASS, &parm);
|
mix_out_high_bass(AUDIO_EQ_BASS, &parm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void kt_init(void)
|
void kt_init(void)
|
||||||
{
|
{
|
||||||
|
u32 delay_10ms_cnt = 0;
|
||||||
|
PA_MUTE();
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
clr_wdt();
|
||||||
|
os_time_dly(2);
|
||||||
|
delay_10ms_cnt++;
|
||||||
|
if (delay_10ms_cnt > 40)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
__this->bass = (adc_get_value(KTCFG_BASS_AD_CHANNEL) * 24 / 1023) - 12;
|
__this->bass = (adc_get_value(KTCFG_BASS_AD_CHANNEL) * 24 / 1023) - 12;
|
||||||
user_eq_bass(0, __this->bass);
|
user_eq_bass(0, __this->bass);
|
||||||
__this->treble = (adc_get_value(KTCFG_TREBLE_AD_CHANNEL) * 24 / 1023) - 12;
|
__this->treble = (adc_get_value(KTCFG_TREBLE_AD_CHANNEL) * 24 / 1023) - 12;
|
||||||
@ -192,7 +200,6 @@ u8 kt_key_event_filter_after(int key_event)
|
|||||||
app_audio_set_volume(APP_AUDIO_STATE_MUSIC, __this->volume, 1);
|
app_audio_set_volume(APP_AUDIO_STATE_MUSIC, __this->volume, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 读取BASS AD值并转换为-12到12的范围
|
// 读取BASS AD值并转换为-12到12的范围
|
||||||
s8 bass = (adc_get_value(KTCFG_BASS_AD_CHANNEL) * 24 / 1023) - 12;
|
s8 bass = (adc_get_value(KTCFG_BASS_AD_CHANNEL) * 24 / 1023) - 12;
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1867,6 +1867,8 @@ objs/apps/kaotings/kt.c.o
|
|||||||
-r=objs/apps/kaotings/kt.c.o,mix_out_high_bass,l
|
-r=objs/apps/kaotings/kt.c.o,mix_out_high_bass,l
|
||||||
-r=objs/apps/kaotings/kt.c.o,user_eq_bass,pl
|
-r=objs/apps/kaotings/kt.c.o,user_eq_bass,pl
|
||||||
-r=objs/apps/kaotings/kt.c.o,kt_init,pl
|
-r=objs/apps/kaotings/kt.c.o,kt_init,pl
|
||||||
|
-r=objs/apps/kaotings/kt.c.o,clr_wdt,l
|
||||||
|
-r=objs/apps/kaotings/kt.c.o,os_time_dly,l
|
||||||
-r=objs/apps/kaotings/kt.c.o,adc_get_value,l
|
-r=objs/apps/kaotings/kt.c.o,adc_get_value,l
|
||||||
-r=objs/apps/kaotings/kt.c.o,app_audio_set_volume,l
|
-r=objs/apps/kaotings/kt.c.o,app_audio_set_volume,l
|
||||||
-r=objs/apps/kaotings/kt.c.o,bled_set,pl
|
-r=objs/apps/kaotings/kt.c.o,bled_set,pl
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user