Modular detection system with resource manager.
Includes pull request !87 with modifications by Adam Honse (calcprogrammer1@gmail.com).
This commit is contained in:
parent
b3a7b7be81
commit
ddc69778dc
50 changed files with 318 additions and 145 deletions
24
DeviceDetector.h
Normal file
24
DeviceDetector.h
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
|
||||
#include "ResourceManager.h"
|
||||
|
||||
class DeviceDetector
|
||||
{
|
||||
public:
|
||||
DeviceDetector(DeviceDetectorFunction detector)
|
||||
{
|
||||
ResourceManager::get()->RegisterDeviceDetector(detector);
|
||||
}
|
||||
};
|
||||
|
||||
class I2CDeviceDetector
|
||||
{
|
||||
public:
|
||||
I2CDeviceDetector(I2CDeviceDetectorFunction detector)
|
||||
{
|
||||
ResourceManager::get()->RegisterI2CDeviceDetector(detector);
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue