esp_chip_info() - Incompatible type for argument

qwertxx
Posts: 3
Joined: Sun May 05, 2019 4:24 pm

esp_chip_info() - Incompatible type for argument

Postby qwertxx » Sun Jun 02, 2019 11:29 am

Hello

I'm using esp_chip_info().
In code belowe there is an error while compiling - why?:

C:/msys32/home/Laptop_1/esp/esp-idf/dd/smog_003/main/esp_chip.c: In function 'dd_esp_chip_info':
C:/msys32/home/Laptop_1/esp/esp-idf/dd/smog_003/main/esp_chip.c:31:16: error: incompatible type for argument 1 of 'esp_chip_info'
esp_chip_info(chip_info);
^
In file included from C:/msys32/home/Laptop_1/esp/esp-idf/dd/smog_003/main/esp_chip.c:3:0:
C:/msys32/home/Laptop_1/esp/esp-idf/components/esp32/include/esp_system.h:330:6: note: expected 'esp_chip_info_t * {aka struct <anonymous> *}' but argument is of type 'esp_chip_info_t {aka struct <anonymous>}'
void esp_chip_info(esp_chip_info_t* out_info);
^
make[1]: *** [/home/Laptop_1/esp/esp-idf/make/component_wrapper.mk:286: esp_chip.o] Błąd 1
make: *** [C:/msys32/home/Laptop_1/esp/esp-idf/make/project.mk:530: component-main-build] Błąd 2

Code: Select all

//--- Chip info ------
#include "esp_system.h"
esp_chip_info_t chip_info;
esp_chip_info(chip_info);

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: esp_chip_info() - Incompatible type for argument

Postby WiFive » Mon Jun 03, 2019 3:28 am

Code: Select all

esp_chip_info(&chip_info);

Who is online

Users browsing this forum: Bing [Bot] and 242 guests