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

hal::soft::bit_bang_i2c does not configure output pins to open drain #36

Closed
kammce opened this issue Aug 16, 2024 · 0 comments · Fixed by #37
Closed

hal::soft::bit_bang_i2c does not configure output pins to open drain #36

kammce opened this issue Aug 16, 2024 · 0 comments · Fixed by #37
Assignees
Labels
bug Something isn't working

Comments

@kammce
Copy link
Member

kammce commented Aug 16, 2024

The bit bang i2c driver does not configure the output pins to open drain relying on the developer to configure the pins themselves before its use. The driver should ensure that the hardware is initialized into a safe configuration before returning. This was an oversight in my review of the #7 PR.

@kammce kammce added the bug Something isn't working label Aug 16, 2024
@kammce kammce self-assigned this Aug 16, 2024
kammce added a commit that referenced this issue Aug 17, 2024
Critical bug fix in bit_bang_i2c that can lead to device damage. The
output pins NEED to be set as open drain in order to not cause bus
contention which can damage devices and cause short circuits.

The constructor now properly configures the sda and scl output pins and
configures and performs initial configuration.

Resolves #36
kammce added a commit that referenced this issue Aug 18, 2024
Critical bug fix in bit_bang_i2c that can lead to device damage. The
output pins NEED to be set as open drain in order to not cause bus
contention which can damage devices and cause short circuits.

The constructor now properly configures the sda and scl output pins and
configures and performs initial configuration.

Resolves #36
@kammce kammce closed this as completed in f1c93bd Aug 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant