My application can be compiled with current git master tree.
However, when I try to compile with v3.1.1 esp-idf, I got compile errors.
e.g.
In master tree:
struct gattc_search_cmpl_evt_param {
esp_gatt_status_t status; /*!< Operation status */
uint16_t conn_id; /*!< Connection id */
esp_service_source_t searched_service_source; /*!< The source of the service information */
} search_cmpl;
In v3.1.1:
struct gattc_search_cmpl_evt_param {
esp_gatt_status_t status; /*!< Operation status */
uint16_t conn_id; /*!< Connection id */
} search_cmpl;
So "searched_service_source" does not exist in v3.1.1.
I though something like below should work, but I don't find similar define for IDF_MAJOR_VER/IDF_MINOR_VER in esp-idf sdk.
Code: Select all
#if IDF_MAJOR_VER >= 3 && IDF_MINOR_VER >= 2
// for the code compatible with git master..
#elif IDF_MAJOR_VER >= 3 && IDF_MINOR_VER >= 1
// for the code compatible with v3.1
#else
// for the code compatible with v3.0
#endif
to allow it to be compiled with different IDF versions?