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

Can't use spiram.h functions when building with cpp. (IDFGH-4861) #6658

Closed
wants to merge 1 commit into from

Conversation

mongonta0716
Copy link
Contributor

Functions in spiram.h cannot be used when built with cpp because extern "C" is not defined in spiram.h.

@CLAassistant
Copy link

CLAassistant commented Mar 4, 2021

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot changed the title Can't use spiram.h functions when building with cpp. Can't use spiram.h functions when building with cpp. (IDFGH-4861) Mar 4, 2021
@Alvin1Zhang
Copy link
Collaborator

Thanks for your contribution.

@ginkgm
Copy link
Collaborator

ginkgm commented Mar 5, 2021

Hi @mongonta0716 ,

Thanks for your contribution!

Generally speaking, it's non-public API, so we don't suggest you use that header directly, and haven't add CPP guard for it. But since you have your use case, we will accept this.

@mongonta0716
Copy link
Contributor Author

Hi @ginkgm ,Thanks for your reply.

I noticed this API while doing research on devices with 8MB of PSRAM. I'm sorry I didn't know it was non-public.

Is there any other API to know the total amount of PSRAM?

@espressif-bot espressif-bot added Status: In Progress Work is in progress Status: Done Issue is done internally Resolution: Done Issue is done internally and removed Status: In Progress Work is in progress labels May 5, 2021
espressif-bot pushed a commit that referenced this pull request May 17, 2021
@igrr
Copy link
Member

igrr commented May 17, 2021

Hi @mongonta0716, thank you for the PR. Your fix has been cherry-picked as 897496d with a subsequent commit applying similar fix for other chips. esp_spiram_get_chip_size function indeed looks like the correct one to use for the purpose you have mentioned.

@igrr igrr closed this May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants