Add support for FC14 SPI (Untested) and FC15 I2C#321
Merged
Conversation
Contributor
Author
|
@felipebalbi @jerrysxie @DM777-ms Adding FC15 support changes. For the review comment from #235 - are we planning to adding this in PAC? Let me know if there is anything related to this review comment that needs to be addressed in this PR. |
DM777-ms
reviewed
Feb 19, 2025
felipebalbi
requested changes
Feb 19, 2025
2449943 to
00d6f35
Compare
jerrysxie
requested changes
Feb 21, 2025
00d6f35 to
c8eb340
Compare
tullom
approved these changes
Mar 12, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for FC14 SPI (untested) and FC15 I2C by introducing new abstractions for handling FC15 pins and extending flexcomm implementations. Key changes include:
- Adding a new trait and struct (FC15Pin) in src/iopctl.rs with its corresponding macro to support FC15 pin configuration.
- Introducing new flexcomm implementations for FLEXCOMM14 (SPI) and FLEXCOMM15 (I2C), updating clock selection and peripheral enable code.
- Adjusting the I2C instance mapping and count to incorporate FLEXCOMM15.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/iopctl.rs | Added new FC15 pin support via trait ToFC15Pin, FC15Pin struct, and a dedicated macro. |
| src/flexcomm.rs | Extended flexcomm support to include new implementations for FLEXCOMM14 and FLEXCOMM15 with updated clock setup. |
| src/i2c/mod.rs | Modified I2C instance handling to map FLEXCOMM15 to a new index and update the instance count. |
| src/chips/mimxrt633s.rs | Updated peripheral list to include FC15 I2C pins. |
| src/chips/mimxrt685s.rs | Updated peripheral list to include FC15 I2C pins. |
Comments suppressed due to low confidence (3)
src/iopctl.rs:416
- [nitpick] The set_function method in the FC15Pin implementation intentionally ignores the provided function value. Consider adding or expanding the inline documentation to clarify that FC15 pins have fixed functionality and thus do not support runtime function configuration.
fn set_function(&self, _function: Function) -> &Self {
src/flexcomm.rs:115
- FLEXCOMM14 SPI support is marked as untested. Please ensure that adequate tests are added to validate its functionality before this feature is used in production.
// TODO: FLEXCOMM 14 is untested. Enable SPI support on FLEXCOMM14
src/i2c/mod.rs:105
- [nitpick] Mapping FLEXCOMM15 to index 8 uses a magic number; consider documenting the rationale behind this mapping or replacing it with a named constant to enhance code clarity.
if $n == 15 { info_index = 8; }
c8eb340 to
900e261
Compare
jerrysxie
approved these changes
Mar 12, 2025
900e261 to
9bdbc7a
Compare
DM777-ms
approved these changes
Mar 13, 2025
felipebalbi
requested changes
Mar 13, 2025
9bdbc7a to
eab675d
Compare
eab675d to
da56435
Compare
felipebalbi
approved these changes
Mar 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

@tullom FYI