Modified for compatibility with Rev.E. hardware
Fork of AkmSensor by
akmakd.h
- Committer:
- masahikofukasawa
- Date:
- 2016-04-28
- Revision:
- 0:7a00359e701e
- Child:
- 6:c4401549d68f
File content as of revision 0:7a00359e701e:
#ifndef AKMAKD_H #define AKMAKD_H #include "mbed.h" #include "SerialNano.h" #include "akmsensor.h" #include "akmecompass.h" class AkmAkd : public AkmSensor { public: // SUB ID typedef enum { // 5bit ID SUB_ID_AK8963N = 0x1A, // 26 SUB_ID_AK8963C = 0x1B, // 27 SUB_ID_AK09911 = 0x0A, // 10 SUB_ID_AK09912 = 0x09, // 9 SUB_ID_AK09915 = 0x0D, // 13 SUB_ID_AK09916C = 0x0E, // 14 } SubIdAkd; /** * Constructor. * */ AkmAkd(); /** * Destructor. * */ virtual ~AkmAkd(); virtual AkmSensor::Status init(const uint8_t id, const uint8_t subid); virtual bool isEvent(); virtual AkmSensor::Status startSensor(); virtual AkmSensor::Status startSensor(const float sec); virtual AkmSensor::Status stopSensor(); virtual AkmSensor::Status readSensorData(Message* msg); virtual Status requestCommand(Message* in, Message* out); void checkDRDY(); void detectDRDY(); int getSensorType(); char* getSensorName(); private: bool event; uint8_t primaryId; uint8_t subId; Ticker ticker; AkmECompass* compass; InterruptIn* drdy; char* sensorName; }; #endif