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

Added yaml for some F425 peripherals #64

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

RationalAsh
Copy link
Contributor

I've added yaml files for some of the peripherals. Let me know if I should try to do everything before merge.

Copy link

Memory map comparison

Copy link
Collaborator

@qwandor qwandor left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. As noted in the comments below, please try to share common patches between chip families as much as possible by using includes, rather than copying and pasting it.

@@ -0,0 +1,148 @@
"ADC?":
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add copyright headers to this and all the other new files. You can also add yourself to the AUTHORS file if you want to.

# RSQ0:
# RL: [0, 7]
# "RSQ?":
# "RSQ*": [0, 18]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are these lines commented out?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm still trying to figure out the YAML syntax for the patches actually, commented these out as they didn't work the way that I thought they do.

NotStarted: [0, "No regular channel conversion started"]
Started: [1, "Regular channel conversion has started"]
_write:
Clear: [0, "Clear the regular channel start flag"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks like many of these are copied from adc_common.yaml. Please share common peripherals via includes where possible, rather than copying and pasting. See how e.g. adc_f3.yaml just includes adc_common.yaml and some other files for the parts that are different.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it's true that many of these are common with adc_common.yaml but there are some subtle differences in the f4 series that might take a long time to compare / integrate with adc_common. So this is more of an intermediate step to have things working.

@@ -0,0 +1,71 @@
# Copyright 2021 The gd32-rs authors.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you mean 2024?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will fix these 😅

OMODE:
"OM*":
PushPull: [0, "Output push-pull (reset state)"]
OpenDrain: [1, "Output open-drain"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Again, it looks like a lot of this is just copied from gpio.yaml, please include it rather than copying it. Then this file can have only the parts that are specific to the F4 family.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same as for the ADC, will figure out the common parts in a future commit.

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