mirror of
https://github.com/espressif/esp-idf.git
synced 2025-12-11 02:07:46 +00:00
Merge branch 'bugfix/gpio_standardization_fix' into 'master'
fix(gpio): minor improvement to output/input configuration step Closes IDF-12240 See merge request espressif/esp-idf!36973
This commit is contained in:
@@ -51,6 +51,8 @@ static inline void gpio_ll_get_io_config(gpio_dev_t *hw, uint32_t gpio_num, gpio
|
||||
io_config->pd = IO_MUX.gpion[gpio_num].gpion_fun_wpd;
|
||||
io_config->ie = IO_MUX.gpion[gpio_num].gpion_fun_ie;
|
||||
io_config->oe = (hw->enable.val & (1 << gpio_num)) >> gpio_num;
|
||||
io_config->oe_ctrl_by_periph = !(hw->funcn_out_sel_cfg[gpio_num].funcn_oe_sel);
|
||||
io_config->oe_inv = hw->funcn_out_sel_cfg[gpio_num].funcn_oe_inv_sel;
|
||||
io_config->od = hw->pinn[gpio_num].pinn_pad_driver;
|
||||
io_config->drv = (gpio_drive_cap_t)IO_MUX.gpion[gpio_num].gpion_fun_drv;
|
||||
io_config->fun_sel = IO_MUX.gpion[gpio_num].gpion_mcu_sel;
|
||||
@@ -483,7 +485,7 @@ static inline void gpio_ll_set_input_signal_from(gpio_dev_t *hw, uint32_t signal
|
||||
*/
|
||||
static inline void gpio_ll_set_output_enable_ctrl(gpio_dev_t *hw, uint8_t gpio_num, bool ctrl_by_periph, bool oen_inv)
|
||||
{
|
||||
hw->funcn_out_sel_cfg[gpio_num].funcn_oe_inv_sel = oen_inv;
|
||||
hw->funcn_out_sel_cfg[gpio_num].funcn_oe_inv_sel = oen_inv; // control valid only when using gpio matrix to route signal to the IO
|
||||
hw->funcn_out_sel_cfg[gpio_num].funcn_oe_sel = !ctrl_by_periph;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "soc/ledc_reg.h"
|
||||
#include "soc/clk_tree_defs.h"
|
||||
#include "soc/pcr_struct.h"
|
||||
#include "soc/soc_caps.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -369,6 +370,7 @@ static inline void ledc_ll_get_duty(ledc_dev_t *hw, ledc_mode_t speed_mode, ledc
|
||||
*/
|
||||
static inline void ledc_ll_set_fade_param_range(ledc_dev_t *hw, ledc_mode_t speed_mode, ledc_channel_t channel_num, uint8_t range, uint32_t dir, uint32_t cycle, uint32_t scale, uint32_t step)
|
||||
{
|
||||
HAL_ASSERT(range < SOC_LEDC_GAMMA_CURVE_FADE_RANGE_MAX);
|
||||
ledc_channel_gamma_fade_param_t range_param = {
|
||||
.duty_inc = dir,
|
||||
.duty_cycle = cycle,
|
||||
|
||||
Reference in New Issue
Block a user