Where are header functions defined?

gribble
Posts: 2
Joined: Sat Mar 22, 2025 8:28 pm

Where are header functions defined?

Postby gribble » Sat Mar 22, 2025 8:47 pm

Hello, I am a beginner, learning by working through the docs and example projects.

In the starter example `Hello_World`, the `esp_chip_info` function is called to fetch some information about the chip.

I see that the function is declared in the `esp_chip_info.h` header file, but it is of course not defined there. I figure the file with the definition is part of the build process via ESP-IDF. I would like to poke my nose around the actual function definitions, if possible.

Where is the function `esp_chip_info` defined? How can I find where functions (declared in various component header files) are defined, in general?
Last edited by gribble on Sun Mar 23, 2025 2:23 am, edited 1 time in total.

Sprite
Espressif staff
Espressif staff
Posts: 10651
Joined: Thu Nov 26, 2015 4:08 am

Re: Where are header functions defined?

Postby Sprite » Sun Mar 23, 2025 1:04 am

It depends on your chip, but e.g. for the ESP32 it's defined here. And how you can find it, well, you use whatever support for looking up definitions your IDE has or you search the esp-idf/components directory for the term and eyeball which is the definition or you chuck the name of the function into Githubs search function, like I just did.

gribble
Posts: 2
Joined: Sat Mar 22, 2025 8:28 pm

Re: Where are header functions defined?

Postby gribble » Sun Mar 23, 2025 2:22 am

@ESP_Admin thank you! the GitHub search was exactly what I was looking for, neat feature 8-)

Who is online

Users browsing this forum: ChatGPT-User, PetalBot and 2 guests