docs(ota_mutex): 添加函数注释说明

This commit is contained in:
小龙虾
2026-06-15 01:14:29 +08:00
parent 929faf1d38
commit 2875ef2145
17 changed files with 1026 additions and 0 deletions
+2
View File
@@ -14,6 +14,7 @@ extern volatile bool g_esp32OtaOccupied;
// 获取全局 OTA 占用标志(带超时),成功返回 true
// 内部: Take Mutex → 检查标志 → 若空闲则置 true → Give Mutex
/** @brief 获取全局 OTA 占用标志(带超时),成功返回 true。 */
static inline bool esp32_ota_mutex_acquire(uint32_t timeout_ms) {
if (!g_esp32OtaMutex) return false;
if (xSemaphoreTake(g_esp32OtaMutex, pdMS_TO_TICKS(timeout_ms)) != pdTRUE) return false;
@@ -28,6 +29,7 @@ static inline bool esp32_ota_mutex_acquire(uint32_t timeout_ms) {
// 释放全局 OTA 占用标志
// 内部: Take Mutex → 清除标志 → Give Mutex
/** @brief 释放全局 OTA 占用标志。 */
static inline void esp32_ota_mutex_release(void) {
if (!g_esp32OtaMutex) return;
xSemaphoreTake(g_esp32OtaMutex, portMAX_DELAY);