Print version number of device 1 on each raw dev.

Only works on HID++ >=2.0 so far. Also solves a race condition where
the wrong response can be sent to a request.
This commit is contained in:
pixl
2020-06-18 01:34:25 -04:00
parent 14d07c220e
commit c21a923ab2
19 changed files with 518 additions and 123 deletions
+37
View File
@@ -0,0 +1,37 @@
#ifndef LOGID_BACKEND_HIDPP20_FEATURE_ROOT_H
#define LOGID_BACKEND_HIDPP20_FEATURE_ROOT_H
#include "../Feature.h"
#include "../feature_defs.h"
namespace logid {
namespace backend {
namespace hidpp20
{
class Root : public Feature
{
public:
static const uint16_t ID = FeatureID::ROOT;
virtual uint16_t getID() { return ID; }
enum Function : uint8_t
{
GetFeature = 0,
Ping = 1
};
Root(Device* device);
feature_info getFeature (uint16_t feature_id);
void ping();
private:
enum FeatureFlag : uint8_t
{
Obsolete = 1<<7,
Hidden = 1<<6,
Internal = 1<<5
};
};
}}}
#endif //LOGID_BACKEND_HIDPP20_FEATURE_ROOT_H