mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
Merge branch 'bugfix/gpio_8_16_bit_access' into 'master'
feat(gpio): add gpio_config_as_analog() API Closes IDF-10247 and IDFGH-12754 See merge request espressif/esp-idf!35856
This commit is contained in:
@@ -20,13 +20,13 @@
|
||||
#include "soc/gpio_periph.h"
|
||||
#include "soc/gpio_struct.h"
|
||||
#include "soc/lp_aon_struct.h"
|
||||
#include "soc/lp_io_struct.h"
|
||||
#include "soc/pmu_struct.h"
|
||||
#include "soc/usb_serial_jtag_reg.h"
|
||||
#include "soc/pcr_struct.h"
|
||||
#include "soc/clk_tree_defs.h"
|
||||
#include "hal/gpio_types.h"
|
||||
#include "hal/assert.h"
|
||||
#include "hal/misc.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -81,7 +81,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].out_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;
|
||||
@@ -333,10 +333,7 @@ static inline void gpio_ll_od_enable(gpio_dev_t *hw, uint32_t gpio_num)
|
||||
__attribute__((always_inline))
|
||||
static inline void gpio_ll_matrix_out_default(gpio_dev_t *hw, uint32_t gpio_num)
|
||||
{
|
||||
gpio_func_out_sel_cfg_reg_t reg = {
|
||||
.out_sel = SIG_GPIO_OUT_IDX,
|
||||
};
|
||||
hw->func_out_sel_cfg[gpio_num].val = reg.val;
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(hw->func_out_sel_cfg[gpio_num], out_sel, SIG_GPIO_OUT_IDX);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -136,9 +136,9 @@ static inline void rtcio_ll_output_disable(int rtcio_num)
|
||||
static inline void rtcio_ll_set_level(int rtcio_num, uint32_t level)
|
||||
{
|
||||
if (level) {
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(LP_IO.out_data_w1ts, out_data_w1ts, BIT(rtcio_num));
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(LP_IO.out_data_w1ts, out_w1ts, BIT(rtcio_num));
|
||||
} else {
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(LP_IO.out_data_w1tc, out_data_w1tc, BIT(rtcio_num));
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(LP_IO.out_data_w1tc, out_w1tc, BIT(rtcio_num));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -364,7 +364,7 @@ static inline void rtcio_ll_intr_enable(int rtcio_num, rtcio_ll_intr_type_t type
|
||||
LP_IO.pin[rtcio_num].int_type = type;
|
||||
|
||||
/* Work around for HW issue,
|
||||
need to also enable this clk, so that LP_IO.status.status_interrupt can get updated,
|
||||
need to also enable this clk, so that (LP_IO.status, status_interrupt) can get updated,
|
||||
and trigger the interrupt on the LP Core
|
||||
*/
|
||||
LP_IO.date.clk_en = 1;
|
||||
@@ -457,7 +457,7 @@ static inline uint32_t rtcio_ll_get_interrupt_status(void)
|
||||
*/
|
||||
static inline void rtcio_ll_clear_interrupt_status(void)
|
||||
{
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(LP_IO.status_w1tc, status_w1tc, 0xff);
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(LP_IO.status_w1tc, status_intr_w1tc, 0xff);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
Reference in New Issue
Block a user