2024-01-17 10:44:50 +01:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
2020-11-06 15:54:51 +08:00
|
|
|
#pragma once
|
2016-08-17 23:08:22 +08:00
|
|
|
|
2024-01-17 10:44:50 +01:00
|
|
|
#include "esp_err.h"
|
2016-08-17 23:08:22 +08:00
|
|
|
|
|
|
|
namespace nvs
|
|
|
|
{
|
2024-01-17 10:44:50 +01:00
|
|
|
class Lock
|
2016-08-17 23:08:22 +08:00
|
|
|
{
|
2024-01-17 10:44:50 +01:00
|
|
|
public:
|
|
|
|
Lock();
|
|
|
|
~Lock();
|
|
|
|
static esp_err_t init();
|
|
|
|
static void uninit();
|
|
|
|
#ifndef LINUX_TARGET
|
|
|
|
private:
|
|
|
|
static _lock_t mSemaphore;
|
|
|
|
#endif
|
|
|
|
};
|
2016-08-17 23:08:22 +08:00
|
|
|
} // namespace nvs
|