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

ESP32-S2: Remove calloc in AnalogIn #3810

Merged
merged 6 commits into from
Dec 15, 2020
Merged

ESP32-S2: Remove calloc in AnalogIn #3810

merged 6 commits into from
Dec 15, 2020

Conversation

hierophect
Copy link
Collaborator

My implementation of the ADC in AnalogIn brought in a calloc from the example code in the IDF that isn't necessary and may have been causing memory corruption. Removing it resolves #3809 on my Saola 1 (Wroom).

@hierophect hierophect added the espressif applies to multiple Espressif chips label Dec 8, 2020
Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

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

The other changes look great. I just am suggesting reducing NO_OF_SAMPLES to speed things up.

ports/esp32s2/common-hal/analogio/AnalogIn.c Outdated Show resolved Hide resolved
@tannewt tannewt removed their request for review December 15, 2020 01:24
Copy link
Member

@jepler jepler left a comment

Choose a reason for hiding this comment

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

[no testing performed, but checked that Dan's earlier requested change was incorporated]

@jepler
Copy link
Member

jepler commented Dec 15, 2020

Looks like this needs manual attention due to translation changes on the main branch.

Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

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

Looks good! Yes, just do a merge from upstream, try make check-translate and if that complains , a make translate.

Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

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

👍 Can merge if builds are fine.

@dhalbert dhalbert merged commit a2d2d69 into adafruit:main Dec 15, 2020
@hierophect hierophect deleted the esp-analog-hang branch December 16, 2020 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
espressif applies to multiple Espressif chips
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AnalogIn crash
3 participants