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

Add more configuration symbols and simplify the build script #264

Merged
merged 1 commit into from
Nov 17, 2022

Conversation

jessebraham
Copy link
Member

I've added a number of new symbols here to hopefully make our code a bit easier to reason about. I've also changed our approach in the build script, where each chip just defines all of its symbols now. I think this will be easier to maintain.

I was careful when changing the #[cfg]s but it's always possible I've made a mistake, so @MabezDev @bjoernQ please double check my work if you could! I've also consolidated the DmaPeripheral enums, and again while I've already checked this please review it.

Not sure how many more symbols we can pull out right now, but if I've missed anything let me know!

Adc = 8,
#[cfg(esp32s3)]
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure this way of defining DmaPeripheral will work fine in future - e.g. on C6 9 is PARLIO while on S3 it's RMT - not much of a problem now but no idea how these IDs will look like for future chips

Copy link
Member Author

@jessebraham jessebraham Nov 17, 2022

Choose a reason for hiding this comment

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

Okay, well at least the existing chips can share a definition I think. If we need to re-introduce a #[cfg] and one or more DmaPeripherals enums in the future we can do so.

esp-hal-common/build.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@bjoernQ bjoernQ left a comment

Choose a reason for hiding this comment

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

LGTM

@jessebraham jessebraham merged commit d913535 into esp-rs:main Nov 17, 2022
@jessebraham jessebraham deleted the feature/cfg branch November 17, 2022 15:42
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