mutex lgo test
This commit is contained in:
@@ -40,6 +40,8 @@ void PinController::initialize_output_pin(const uint8_t address)
|
|||||||
|
|
||||||
void PinController::write_pin(uint8_t address, bool value)
|
void PinController::write_pin(uint8_t address, bool value)
|
||||||
{
|
{
|
||||||
|
std::lock_guard<std::mutex> guard(log);
|
||||||
|
|
||||||
digitalWrite(address, value);
|
digitalWrite(address, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,8 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
static std::once_flag GPIO_LIB_INITIALIZED;
|
static std::once_flag GPIO_LIB_INITIALIZED;
|
||||||
|
|
||||||
|
static std::mutex log;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user