File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ STATIC void machine_timer_isr(void *self_in) {
134
134
135
135
#if HAVE_TIMER_LL
136
136
137
- #if CONFIG_IDF_TARGET_ESP32
137
+ #if CONFIG_IDF_TARGET_ESP32 && ESP_IDF_VERSION < ESP_IDF_VERSION_VAL ( 5 , 0 , 0 )
138
138
device -> hw_timer [self -> index ].update = 1 ;
139
139
#else
140
140
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL (4 , 4 , 0 )
@@ -148,7 +148,11 @@ STATIC void machine_timer_isr(void *self_in) {
148
148
#endif
149
149
#endif
150
150
timer_ll_clear_intr_status (device , self -> index );
151
+ #if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL (5 , 0 , 0 )
151
152
timer_ll_set_alarm_enable (device , self -> index , self -> repeat );
153
+ #else
154
+ timer_ll_set_alarm_value (device , self -> index , self -> repeat );
155
+ #endif
152
156
153
157
#else
154
158
Original file line number Diff line number Diff line change @@ -121,16 +121,16 @@ set(IDF_COMPONENTS
121
121
xtensa
122
122
)
123
123
124
- if (IDF_VERSION_MINOR GREATER_EQUAL 1)
124
+ if (IDF_VERSION_MINOR GREATER_EQUAL 1 OR IDF_VERSION_MAJOR GREATER_EQUAL 5 )
125
125
list (APPEND IDF_COMPONENTS esp_netif)
126
126
endif ()
127
127
128
- if (IDF_VERSION_MINOR GREATER_EQUAL 2)
128
+ if (IDF_VERSION_MINOR GREATER_EQUAL 2 OR IDF_VERSION_MAJOR GREATER_EQUAL 5 )
129
129
list (APPEND IDF_COMPONENTS esp_system)
130
130
list (APPEND IDF_COMPONENTS esp_timer)
131
131
endif ()
132
132
133
- if (IDF_VERSION_MINOR GREATER_EQUAL 3)
133
+ if (IDF_VERSION_MINOR GREATER_EQUAL 3 OR IDF_VERSION_MAJOR GREATER_EQUAL 5 )
134
134
list (APPEND IDF_COMPONENTS esp_hw_support)
135
135
list (APPEND IDF_COMPONENTS esp_pm)
136
136
list (APPEND IDF_COMPONENTS hal)
@@ -203,7 +203,7 @@ foreach(comp ${IDF_COMPONENTS})
203
203
micropy_gather_target_properties(__idf_${comp} )
204
204
endforeach ()
205
205
206
- if (IDF_VERSION_MINOR GREATER_EQUAL 2)
206
+ if (IDF_VERSION_MINOR GREATER_EQUAL 2 OR IDF_VERSION_MAJOR GREATER_EQUAL 5 )
207
207
# These paths cannot currently be found by the IDF_COMPONENTS search loop above,
208
208
# so add them explicitly.
209
209
list (APPEND MICROPY_CPP_INC_EXTRA ${IDF_PATH} /components/soc/soc/${IDF_TARGET} /include )
You can’t perform that action at this time.
0 commit comments