Modified for compatibility with Rev.E. hardware
Fork of AkmSensor by
ak9752ctrl.h
- Committer:
- masahikofukasawa
- Date:
- 2017-03-11
- Revision:
- 27:41aa9fb23a2f
- Parent:
- 13:d008249f0359
- Child:
- 29:b488d2c89fba
File content as of revision 27:41aa9fb23a2f:
#ifndef AK9752CTRL_H #define AK9752CTRL_H #include "mbed.h" #include "akmsensor.h" #include "AK9752.h" class Ak9752Ctrl : public AkmSensor { public: typedef enum { SUB_ID_AK9752 = 0x02 } SubIdAk9752; /** * Constructor. * */ Ak9752Ctrl(); /** * Destructor. * */ virtual ~Ak9752Ctrl(); virtual AkmSensor::Status init(const uint8_t id, const uint8_t subid); virtual AkmSensor::Status startSensor(); virtual AkmSensor::Status startSensor(const float sec); virtual AkmSensor::Status stopSensor(); virtual AkmSensor::Status readSensorData(Message* msg); virtual AkmSensor::Status requestCommand(Message* in, Message* out); void detectINT(); private: AK9752* ak9752; InterruptIn* interrupt; Ticker ticker; // hold settings AK9752::OperationMode mode; AK9752::FcTmp fc_tmp; AK9752::FcIr fc_ir; }; #endif