Skip to content

espressif/common-hal/frequencyio/FrequencyIn.c: fix heap_caps_malloc() arg order#10490

Merged
tannewt merged 1 commit intoadafruit:mainfrom
dhalbert:frequencyio-heap-caps-malloc
Jul 16, 2025
Merged

espressif/common-hal/frequencyio/FrequencyIn.c: fix heap_caps_malloc() arg order#10490
tannewt merged 1 commit intoadafruit:mainfrom
dhalbert:frequencyio-heap-caps-malloc

Conversation

@dhalbert
Copy link
Copy Markdown
Collaborator

The arguments to heap_caps_malloc() were in the wrong order. Thanks @Sola85 for spotting this.

Tested. Jumpered A0 and A1 on a QT Py ESP32-S3:

>>> import pwmio, frequencyio, board
>>> a0 = pwmio.PWMOut(board.A0, frequency=123456)
>>> a0.duty_cycle=32768
>>> a1 = frequencyio.FrequencyIn(board.A1)
>>> a1.value
123450

Note that it also "worked" before this fix, but the size allocation was all wrong.

@dhalbert dhalbert requested a review from tannewt July 16, 2025 18:46
Copy link
Copy Markdown
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Thank you!

@tannewt tannewt merged commit 804e444 into adafruit:main Jul 16, 2025
223 checks passed
@dhalbert dhalbert deleted the frequencyio-heap-caps-malloc branch July 16, 2025 21:53
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.

Wrong usage of heap_caps_malloc in frequencyio?

2 participants