添加按键高阻态、使飞控进入BOOT、擦除flash

This commit is contained in:
OPTOC
2025-10-21 16:18:57 +08:00
parent 88dadb4f0e
commit 793817d00e
5 changed files with 41 additions and 8 deletions

View File

@@ -83,6 +83,20 @@ void pin_cfg_output(const cfg_board_pin_io_t *pin)
gpio_config(&io_conf);
}
void gpio_to_high_z(const cfg_board_pin_io_t *pin)
{
gpio_config_t io = {
.pin_bit_mask = 1ULL << pin->pin,
.mode = GPIO_MODE_DISABLE, // 或 GPIO_MODE_INPUT都不会驱动外部
.pull_up_en = GPIO_PULLUP_DISABLE,
.pull_down_en = GPIO_PULLDOWN_DISABLE,
.intr_type = GPIO_INTR_DISABLE,
};
gpio_config(&io);
}
/**
* @brief IO 基本操作:设置使输出是否为有效的电平
*