#include "kt.h" #include "drv_st7789.h" void kt_boot_init(void) { // 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) { lcd_st7789_init(); }