blob: 1796de46adb3fad9b48b497be42670e00ccf1266 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#include "spi_lock.h"
spi_lock::spi_lock(uint8_t spidev_index) :
spidev_index(spidev_index)
{
}
uint8_t spi_lock::get_spidev() const
{
return spidev_index;
}
void spi_lock::lock()
{
spi_mutex.lock();
}
void spi_lock::unlock()
{
spi_mutex.unlock();
}
spi_lock::sptr spi_lock::make(uint8_t spidev_index)
{
return std::make_shared<spi_lock>(spidev_index);
}
|