Page 1 of 1

Which API Version is "Included" in Arduino ESP32 Core?

Posted: Thu Jul 22, 2021 1:03 pm
by gfvalvo
Hello,

I was wondering how one relates the official ESP32 API documentation to what is provided in the Arduino ESP32 core. There appears to be some disconnects. For example, the API documentation for the ledc_timer_config_t datatype -- https://docs.espressif.com/projects/esp ... r_config_t -- includes a field called clk_cfg.

However, the definition of that datatype in file 'ledc.h' of Arduino Core 1.0.6 does not include that field:

Code: Select all

/**
 * @brief Configuration parameters of LEDC Timer timer for ledc_timer_config function
 */
typedef struct {
    ledc_mode_t speed_mode;                /*!< LEDC speed speed_mode, high-speed mode or low-speed mode */
    union {
        ledc_timer_bit_t duty_resolution;  /*!< LEDC channel duty resolution */
        ledc_timer_bit_t bit_num __attribute__((deprecated)); /*!< Deprecated in ESP-IDF 3.0. This is an alias to 'duty_resolution' for backward compatibility with ESP-IDF 2.1 */
    };
    ledc_timer_t  timer_num;               /*!< The timer source of channel (0 - 3) */
    uint32_t freq_hz;                      /*!< LEDC timer frequency (Hz) */
} ledc_timer_config_t;
So, does the Arduino ESP32 Core "include" a DIFFERENT version of the API?

Thanks.

Re: Which API Version is "Included" in Arduino ESP32 Core?

Posted: Thu Jul 22, 2021 4:44 pm
by lbernstone
If you look at a specific release on https://github.com/espressif/arduino-esp32/releases, you can always see what the last commit of the IDF was. This is also available as the macro CONFIG_ARDUINO_IDF_COMMIT in your code, which comes from the included config/sdkconfig.h header.
Arduino 1.0.6 is based on IDF 3.3.5 (85c43024c)

Re: Which API Version is "Included" in Arduino ESP32 Core?

Posted: Fri Jul 23, 2021 8:43 am
by ullixesp
Arduino 1.0.6 is based on IDF 3.3.5 (85c43024c)
Is it explained anywhere how the naming conversion from 85c43024c to IDF 3.35 to Arduino 1.0.6 is done?

Re: Which API Version is "Included" in Arduino ESP32 Core?

Posted: Fri Jul 23, 2021 12:37 pm
by lbernstone
The commit number is what you would use to get the IDF version to compile the libraries (git checkout 85c43024c). There is no obvious way to convert from the IDF git number to a tag name (3.3.5) since in most cases, arduino-esp32 is not built directly off an idf release.
If you are looking for some sort of list, my dockerfiles show the commits of releases going back to 1.0.4. https://github.com/lbernstone/arduino-esp32-dockerfiles