Modified for compatibility with Rev.E. hardware
Fork of AkmSensor by
ak9750ctrl.h
- Committer:
- masahikofukasawa
- Date:
- 2016-07-08
- Revision:
- 10:5c69b067d88a
- Child:
- 13:d008249f0359
File content as of revision 10:5c69b067d88a:
#ifndef AK9750CTRL_H #define AK9750CTRL_H #include "mbed.h" #include "akmsensor.h" #include "AK9750.h" class Ak9750Ctrl : public AkmSensor { public: typedef enum { SUB_ID_AK9750 = 0x01 } SubIdIrSensor; /** * Constructor. * */ Ak9750Ctrl(); /** * Destructor. * */ virtual ~Ak9750Ctrl(); 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 AkmSensor::Status requestCommand(Message* in, Message* out); void detectINT(); private: bool event; uint8_t primaryId; uint8_t subId; AK9750* ak9750; InterruptIn* interrupt; Ticker ticker; // hold settings AK9750::OperationMode mode; AK9750::DigitalFilter filter; }; #endif