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

Make the default flashing frequency target specific #389

Merged
merged 5 commits into from
Apr 18, 2023

Conversation

SergioGasquez
Copy link
Member

@SergioGasquez SergioGasquez commented Apr 17, 2023

I've implemented the third solution proposed by @maxwase in #375:

  • Add flash_freq to Esp32Params so we can define a default flashing frequency per target.
  • Specify the default flashing frequency for all the targets.

Copy link
Contributor

@maxwase maxwase left a comment

Choose a reason for hiding this comment

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

Personally, I think FlashFrequency::default() usage is better (as in esp8266 module) and more future-proof (if this code will ever be refactored to use ..Esp32Params::default()), but it's up to decide :)

@SergioGasquez
Copy link
Member Author

SergioGasquez commented Apr 17, 2023 via email

@maxwase
Copy link
Contributor

maxwase commented Apr 17, 2023

Oh, sorry for unclarity 😄, I mean replacing of FlashFrequency::_40Mhz with FlashFrequency::default() as it is a default frequency

@SergioGasquez
Copy link
Member Author

Oh, sorry for unclarity smile, I mean replacing of FlashFrequency::_40Mhz with FlashFrequency::default() as it is a default frequency

Ahh! I've tried this yesterday, but since PARAMS is a const, it fails:

`~const std::default::Default` is not implemented for `FlashFrequency`

And I don't know/couldn't find any easy solution to this

@maxwase
Copy link
Contributor

maxwase commented Apr 18, 2023

Oh, sorry for unclarity smile, I mean replacing of FlashFrequency::_40Mhz with FlashFrequency::default() as it is a default frequency

Ahh! I've tried this yesterday, but since PARAMS is a const, it fails:

`~const std::default::Default` is not implemented for `FlashFrequency`

And I don't know/couldn't find any easy solution to this

Oh, didn't spot that, hope we will get it someday! Other than that, LGTM

Copy link
Member

@jessebraham jessebraham left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for fixing this!

@jessebraham jessebraham merged commit 327f8d4 into esp-rs:main Apr 18, 2023
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.

The ESP32-C2/H2 do not support 40MHz flash frequency, which is the default, resulting in poor UX
3 participants