mirror of
https://github.com/whowechina/geki_pico.git
synced 2024-11-12 01:50:46 +01:00
Enable Sound
This commit is contained in:
parent
83d093a2b9
commit
5437d9bb51
@ -95,8 +95,8 @@ static void run_lights()
|
||||
|
||||
static void run_sound()
|
||||
{
|
||||
//sound_set(0, wad_read_left());
|
||||
//sound_set(1, wad_read_right());
|
||||
sound_set(0, wad_read_left());
|
||||
sound_set(1, wad_read_right());
|
||||
}
|
||||
|
||||
static mutex_t core1_io_lock;
|
||||
|
@ -55,6 +55,7 @@ void sound_init()
|
||||
gpio_set_function(gpio, GPIO_FUNC_PWM);
|
||||
slice_num[i] = pwm_gpio_to_slice_num(gpio);
|
||||
pwm_clear_irq(slice_num[i]);
|
||||
pwm_set_irq_enabled(slice_num[i], true);
|
||||
}
|
||||
irq_set_exclusive_handler(PWM_IRQ_WRAP, pwm_interrupt_handler);
|
||||
irq_set_enabled(PWM_IRQ_WRAP, true);
|
||||
@ -67,8 +68,6 @@ void sound_init()
|
||||
pwm_init(slice_num[i], &cfg, true);
|
||||
pwm_set_gpio_level(sound_gpio[i], 0);
|
||||
}
|
||||
|
||||
sound_toggle(false);
|
||||
}
|
||||
|
||||
void sound_toggle(bool on)
|
||||
|
Loading…
Reference in New Issue
Block a user