mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-16 23:05:38 +00:00
fix(gpio): fix 8/16-bit gpio, rtc/lp_io register access
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "soc/usb_serial_jtag_reg.h"
|
||||
#include "hal/gpio_types.h"
|
||||
#include "hal/assert.h"
|
||||
#include "hal/misc.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -544,7 +545,7 @@ static inline int gpio_ll_get_in_signal_connected_io(gpio_dev_t *hw, uint32_t in
|
||||
{
|
||||
typeof(hw->func_in_sel_cfg[in_sig_idx]) reg;
|
||||
reg.val = hw->func_in_sel_cfg[in_sig_idx].val;
|
||||
return (reg.sig_in_sel ? reg.func_sel : -1);
|
||||
return (reg.sig_in_sel ? reg.in_sel : -1);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -781,7 +782,7 @@ static inline void gpio_ll_get_io_config(gpio_dev_t *hw, uint32_t gpio_num,
|
||||
*fun_sel = (iomux_reg_val & MCU_SEL_M) >> MCU_SEL_S;
|
||||
}
|
||||
if (sig_out) {
|
||||
*sig_out = hw->func_out_sel_cfg[gpio_num].func_sel;
|
||||
*sig_out = HAL_FORCE_READ_U32_REG_FIELD(hw->func_out_sel_cfg[gpio_num], out_sel);
|
||||
}
|
||||
if (slp_sel) {
|
||||
*slp_sel = (iomux_reg_val & SLP_SEL_M) >> SLP_SEL_S;
|
||||
|
Reference in New Issue
Block a user