KT25-1015_AC695x_SDK310/apps/kaotings/kt.c
2026-07-15 10:31:33 +08:00

60 lines
1.6 KiB
C

#include "kt.h"
void kt_boot_init(void)
{
//CS8406 RST
gpio_set_pull_down(IO_PORTA_06,0);
gpio_set_pull_up(IO_PORTA_06,0);
gpio_set_direction(IO_PORTA_06,0);
gpio_set_output_value(IO_PORTA_06,0);
//iis 双绑引脚高阻化
gpio_set_pull_down(IO_PORTA_01,0);
gpio_set_pull_up(IO_PORTA_01,0);
gpio_set_direction(IO_PORTA_01,1);
gpio_set_die(IO_PORTA_01,1);
gpio_set_pull_down(IO_PORTA_05,0);
gpio_set_pull_up(IO_PORTA_05,0);
gpio_set_direction(IO_PORTA_05,1);
gpio_set_die(IO_PORTA_05,1);
//CS8406 TX EN
//ch1
gpio_set_pull_down(IO_PORTB_07,0);
gpio_set_pull_up(IO_PORTB_07,0);
gpio_set_direction(IO_PORTB_07,0);
gpio_set_output_value(IO_PORTB_07,0);
//ch2
gpio_set_pull_down(IO_PORTB_08,0);
gpio_set_pull_up(IO_PORTB_08,0);
gpio_set_direction(IO_PORTB_08,0);
gpio_set_output_value(IO_PORTB_08,0);
//ch3
gpio_set_pull_down(IO_PORTB_09,0);
gpio_set_pull_up(IO_PORTB_09,0);
gpio_set_direction(IO_PORTB_09,0);
gpio_set_output_value(IO_PORTB_09,0);
//ch4
gpio_set_pull_down(IO_PORTB_10,0);
gpio_set_pull_up(IO_PORTB_10,0);
gpio_set_direction(IO_PORTB_10,0);
gpio_set_output_value(IO_PORTB_10,0);
//earphone enable
//ch1
}
void kt_init(void)
{
//CS8406 RST
gpio_set_output_value(IO_PORTA_06,1);
//CS8406 TX EN
gpio_set_output_value(IO_PORTB_07,1);
gpio_set_output_value(IO_PORTB_08,1);
gpio_set_output_value(IO_PORTB_09,1);
gpio_set_output_value(IO_PORTB_10,1);
}