Skip to content

Commit da8352c

Browse files
authored
Merge branch 'master' into feat/hosted_ota
2 parents 8911fa6 + 731aee2 commit da8352c

23 files changed

+52
-1227
lines changed

cores/esp32/esp32-hal-periman.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,30 @@ bool perimanSetBusDeinit(peripheral_bus_type_t type, peripheral_bus_deinit_cb_t
236236
return true;
237237
}
238238

239+
// This no-op callback is used by perimanClearBusDeinit() to effectively disable bus deinit functionality
240+
// without setting the callback to NULL, which would cause errors in perimanSetPinBus() at line 146.
241+
static bool empty_bus_deinit_cb(void *bus) {
242+
return true;
243+
}
244+
245+
bool perimanClearBusDeinit(peripheral_bus_type_t type) {
246+
if (type >= ESP32_BUS_TYPE_MAX || type == ESP32_BUS_TYPE_INIT) {
247+
log_e("Invalid type: %s (%u)", perimanGetTypeName(type), (unsigned int)type);
248+
return false;
249+
}
250+
deinit_functions[type] = empty_bus_deinit_cb;
251+
log_v("Deinit function for type %s (%u) cleared", perimanGetTypeName(type), (unsigned int)type);
252+
return true;
253+
}
254+
239255
peripheral_bus_deinit_cb_t perimanGetBusDeinit(peripheral_bus_type_t type) {
240256
if (type >= ESP32_BUS_TYPE_MAX || type == ESP32_BUS_TYPE_INIT) {
241257
log_e("Invalid type: %s (%u)", perimanGetTypeName(type), (unsigned int)type);
242258
return NULL;
243259
}
260+
if (deinit_functions[type] == empty_bus_deinit_cb) {
261+
return NULL;
262+
}
244263
return deinit_functions[type];
245264
}
246265

cores/esp32/esp32-hal-periman.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ int8_t perimanGetPinBusChannel(uint8_t pin);
134134
// Sets the peripheral destructor callback. Used to destroy bus when pin is assigned another function
135135
bool perimanSetBusDeinit(peripheral_bus_type_t type, peripheral_bus_deinit_cb_t cb);
136136

137+
// Clears the peripheral destructor callback
138+
bool perimanClearBusDeinit(peripheral_bus_type_t type);
139+
137140
// Get the peripheral destructor callback. It allows changing/restoring the peripheral pin function detaching, if necessary
138141
// returns NULL if none is set
139142
peripheral_bus_deinit_cb_t perimanGetBusDeinit(peripheral_bus_type_t type);

docs/en/matter/matter.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Matter Network Topology
3535
.. code-block:: text
3636
3737
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
38-
│ Matter Hub │◄─────►│ Wi-Fi Router │◄─────►│ ESP Border
38+
│ Matter Hub │◄─────►│ Wi-Fi Router │◄─────►│ ESP Thread
3939
│ (HomePod etc) │ │ │ │ Border Router │
4040
└─────────────────┘ └──────────────────┘ └─────────────────┘
4141
│ │ │

idf_component_examples/esp_matter_light/CMakeLists.txt

Lines changed: 0 additions & 28 deletions
This file was deleted.

idf_component_examples/esp_matter_light/README.md

Lines changed: 0 additions & 124 deletions
This file was deleted.

idf_component_examples/esp_matter_light/ci.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

idf_component_examples/esp_matter_light/main/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

idf_component_examples/esp_matter_light/main/Kconfig.projbuild

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)