添加按键高阻态、使飞控进入BOOT、擦除flash
This commit is contained in:
@@ -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 基本操作:设置使输出是否为有效的电平
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user