KT25-1015_AC695x_SDK310/apps/kaotings/kt.c

48 lines
1.1 KiB
C
Raw Normal View History

#include "kt.h"
2026-02-12 13:11:00 +00:00
#include "drv_st7789.h"
void kt_boot_init(void)
{
2026-02-12 13:11:00 +00:00
// mute PA1 PA2 双绑
gpio_set_pull_up(IO_PORTA_01, 0);
gpio_set_pull_down(IO_PORTA_01, 0);
gpio_set_die(IO_PORTA_01, 1);
gpio_set_direction(IO_PORTA_01, 1);
gpio_set_pull_up(CFG_MUTE_PIN, 0);
gpio_set_pull_down(CFG_MUTE_PIN, 0);
gpio_set_direction(CFG_MUTE_PIN, 0);
PA_MUTE();
// flash led PA0 PC7 双绑
gpio_set_pull_up(IO_PORTA_00, 0);
gpio_set_pull_down(IO_PORTA_00, 0);
gpio_set_die(IO_PORTA_00, 1);
gpio_set_direction(IO_PORTA_00, 1);
gpio_set_pull_up(CFG_FLASH_LED_PIN, 0);
gpio_set_pull_down(CFG_FLASH_LED_PIN, 0);
gpio_set_direction(CFG_FLASH_LED_PIN, 0);
FLASH_LED_OFF();
// bt led PA3
gpio_set_pull_up(CFG_BT_LED_PIN, 0);
gpio_set_pull_down(CFG_BT_LED_PIN, 0);
gpio_set_direction(CFG_BT_LED_PIN, 0);
BT_LED_OFF();
// exp pwr PB3
gpio_set_pull_up(CFG_EXP_PWR_PIN, 0);
gpio_set_pull_down(CFG_EXP_PWR_PIN, 0);
gpio_set_direction(CFG_EXP_PWR_PIN, 0);
EXP_PWR_OFF();
}
void kt_init(void)
{
2026-02-12 13:11:00 +00:00
lcd_st7789_init();
}