Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPIO: Wrong mask for PIN PULL UP/DOWN in gpio_ll_get_io_config() (IDFGH-14072) #14886

Open
3 tasks done
IhorNehrutsa opened this issue Nov 14, 2024 · 1 comment
Open
3 tasks done
Labels
Status: Opened Issue is new

Comments

@IhorNehrutsa
Copy link
Contributor

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

In all MCU soc and hal:
Defined as bit:

#define FUN_PD_M (BIT(7))
#define FUN_PU_M (BIT(8))

Used as mask:

    *pu = (iomux_reg_val & FUN_PU_M) >> FUN_PU_S;
    *pd = (iomux_reg_val & FUN_PD_M) >> FUN_PD_S;

image

Also, need to check BIT or MASK:

image

@espressif-bot espressif-bot added the Status: Opened Issue is new label Nov 14, 2024
@github-actions github-actions bot changed the title GPIO: Wrong mask for PIN PULL UP/DOWN in gpio_ll_get_io_config() GPIO: Wrong mask for PIN PULL UP/DOWN in gpio_ll_get_io_config() (IDFGH-14072) Nov 14, 2024
@suda-morris
Copy link
Collaborator

Not sure if I understood your question. But

#define BIT(nr)                 (1UL << (nr))

It's a mask, not a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Opened Issue is new
Projects
None yet
Development

No branches or pull requests

3 participants