Skip to content

nRF5x: Add i2c hal + datagram device #561

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

Merged
merged 31 commits into from
May 26, 2025
Merged

nRF5x: Add i2c hal + datagram device #561

merged 31 commits into from
May 26, 2025

Conversation

Grazfather
Copy link
Collaborator

@Grazfather Grazfather commented May 23, 2025

This adds a HAL for the i2c master peripheral on the nRF5x, both for the byte-banged and the DMA version.

It adds an example of a bus scan and reading from a TMP117 temperature scanner, both using both HALs

});
}

/// Disables I2C, returns peripheral registers to reset state.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not true. Is this true on the rp2xxx? If so, I'd expect set_address in that hal to cause issues.

@Grazfather Grazfather force-pushed the nrf-hal-i2c branch 3 times, most recently from 28d9f2f to dbe79e9 Compare May 24, 2025 21:05
@Grazfather Grazfather marked this pull request as ready for review May 24, 2025 21:33
@@ -195,6 +195,7 @@ test "i2c.translate_baudrate" {
try std.testing.expectError(ConfigError.InputFreqTooLow, translate_baudrate(1_000_000, 31_900_000));
}

// TODO: Why create this empty struct?
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will remove this, but I am wondering why we do this. My hal does not. I don't think it's necessary?

@mattnite mattnite merged commit ce0678f into main May 26, 2025
43 checks passed
@mattnite mattnite deleted the nrf-hal-i2c branch May 26, 2025 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants