Modified for compatibility with Rev.E. hardware
Fork of AkmSensor by
Diff: akmanalogsensor.h
- Revision:
- 13:d008249f0359
- Parent:
- 11:cef8dc1cf010
- Child:
- 23:50c98b286e41
- Child:
- 27:41aa9fb23a2f
--- a/akmanalogsensor.h Wed Aug 10 23:50:53 2016 +0000 +++ b/akmanalogsensor.h Fri Aug 12 00:04:48 2016 +0000 @@ -11,10 +11,28 @@ public: typedef enum { - SUB_ID_EQ430L = 0x00, - SUB_ID_EQ431L = 0x01, - SUB_ID_EQ432L = 0x02, - SUB_ID_EQ433L = 0x03, + SUB_ID_CQ3300 = 0x01, + SUB_ID_CQ3301 = 0x02, + SUB_ID_CQ3302 = 0x03, + SUB_ID_CQ3303 = 0x04, + SUB_ID_CQ330A = 0x05, + SUB_ID_CQ330B = 0x06, + SUB_ID_CQ330E = 0x07, + SUB_ID_CQ330F = 0x08, + SUB_ID_CQ330G = 0x09, + SUB_ID_CQ330H = 0x0A, + } SubIdCurrentSensor; + + typedef enum { + SUB_ID_EM3242 = 0x01, + SUB_ID_AK9710 = 0x08, + } SubIdMisc; + + typedef enum { + SUB_ID_EQ430L = 0x01, + SUB_ID_EQ431L = 0x02, + SUB_ID_EQ432L = 0x03, + SUB_ID_EQ433L = 0x04, } SubIdLinearSensor; /** @@ -35,12 +53,15 @@ virtual AkmSensor::Status stopSensor(); virtual AkmSensor::Status readSensorData(Message* msg); virtual Status requestCommand(Message* in, Message* out); + virtual char* getSensorName(); + void eventCallback(); private: bool event; uint8_t primaryId; uint8_t subId; + char* sensorName; Ticker ticker; AnalogIn* ain;