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)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(log);
|
||||
|
||||
digitalWrite(address, value);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,6 +37,8 @@ protected:
|
||||
|
||||
public:
|
||||
static std::once_flag GPIO_LIB_INITIALIZED;
|
||||
|
||||
static std::mutex log;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user