AP_HAL_Empty: add semaphore to I2CDriver
This commit is contained in:
parent
4c31cc0c2b
commit
0db60464f7
@ -10,7 +10,8 @@ using namespace Empty;
|
||||
static EmptyUARTDriver uartADriver;
|
||||
static EmptyUARTDriver uartBDriver;
|
||||
static EmptyUARTDriver uartCDriver;
|
||||
static EmptyI2CDriver i2cDriver;
|
||||
static EmptySemaphore i2cSemaphore;
|
||||
static EmptyI2CDriver i2cDriver(&i2cSemaphore);
|
||||
static EmptySPIDeviceManager spiDeviceManager;
|
||||
static EmptyAnalogIn analogIn;
|
||||
static EmptyStorage storageDriver;
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
class Empty::EmptyI2CDriver : public AP_HAL::I2CDriver {
|
||||
public:
|
||||
EmptyI2CDriver(AP_HAL::Semaphore* semaphore) : _semaphore(semaphore) {}
|
||||
void begin();
|
||||
void end();
|
||||
void setTimeout(uint16_t ms);
|
||||
@ -31,6 +32,10 @@ public:
|
||||
|
||||
uint8_t lockup_count();
|
||||
|
||||
AP_HAL::Semaphore* get_semaphore() { return _semaphore; }
|
||||
|
||||
private:
|
||||
AP_HAL::Semaphore* _semaphore;
|
||||
};
|
||||
|
||||
#endif // __AP_HAL_EMPTY_I2CDRIVER_H__
|
||||
|
Loading…
Reference in New Issue
Block a user