M5Unified
SH200Q_Class.hpp
Go to the documentation of this file.
1 // Copyright (c) M5Stack. All rights reserved.
2 // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 
4 #ifndef __M5_SH200Q_CLASS_H__
5 #define __M5_SH200Q_CLASS_H__
6 
7 #include "IMU_Base.hpp"
8 
9 namespace m5
10 {
11  class SH200Q_Class : public IMU_Base
12  {
13  public:
14  static constexpr std::uint8_t DEFAULT_ADDRESS = 0x6C;
15 
16  virtual ~SH200Q_Class();
17  SH200Q_Class(std::uint8_t i2c_addr = DEFAULT_ADDRESS, std::uint32_t freq = 400000, I2C_Class* i2c = &In_I2C);
18 
19  imu_spec_t begin(I2C_Class* i2c = nullptr) override;
20  imu_spec_t getImuRawData(imu_raw_data_t* data) const override;
21  void getConvertParam(imu_convert_param_t* param) const override;
22  bool getTempAdc(int16_t* adc) const override;
23 
24  std::uint8_t WhoAmI(void);
25 /*
26  bool getAccelAdc(std::int16_t* ax, std::int16_t* ay, std::int16_t* az) const override;
27  bool getGyroAdc(std::int16_t* gx, std::int16_t* gy, std::int16_t* gz) const override;
28  bool getAccel(float* ax, float* ay, float* az) const override;
29  bool getGyro(float* gx, float* gy, float* gz) const override;
30  bool getTemp(float *t) const override;
31 //*/
32  };
33 }
34 
35 #endif
virtual ~SH200Q_Class()
std::uint8_t WhoAmI(void)
imu_spec_t getImuRawData(imu_raw_data_t *data) const override
static constexpr std::uint8_t DEFAULT_ADDRESS
imu_spec_t begin(I2C_Class *i2c=nullptr) override
SH200Q_Class(std::uint8_t i2c_addr=DEFAULT_ADDRESS, std::uint32_t freq=400000, I2C_Class *i2c=&In_I2C)
void getConvertParam(imu_convert_param_t *param) const override
bool getTempAdc(int16_t *adc) const override
Definition: M5Unified.cpp:48
I2C_Class In_I2C
for internal I2C device
Definition: I2C_Class.cpp:10