Skip to content

Possible Pin Configuration Mistake in I2C Setup #91

Open
@MartinK7

Description

@MartinK7

In the i2c.c file, line 294:

gpio_hal_func_sel(&hal, scl_pin, PIN_FUNC_GPIO); /* <--- Shouldn't this be sda_pin instead? */

It appears that scl_pin is being passed instead of sda_pin when configuring the function selection for GPIO. Given that the surrounding code is configuring sda_pin, this might be an unintended mistake.

Link to Code

https://github.com/badgeteam/BadgerOS/blob/588c6e1476d59193be83b5d7f70555e04d9f3d73/kernel/port/esp_common/src/i2c.c#L294C29-L294C36

Could you confirm whether this is intentional?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions