ESPHome  2024.3.2
mmc5603.h
Go to the documentation of this file.
1 #pragma once
2 
6 
7 namespace esphome {
8 namespace mmc5603 {
9 
14 };
15 
17  public:
18  void setup() override;
19  void dump_config() override;
20  float get_setup_priority() const override;
21  void update() override;
22 
23  void set_datarate(MMC5603Datarate datarate) { datarate_ = datarate; }
24  void set_x_sensor(sensor::Sensor *x_sensor) { x_sensor_ = x_sensor; }
25  void set_y_sensor(sensor::Sensor *y_sensor) { y_sensor_ = y_sensor; }
26  void set_z_sensor(sensor::Sensor *z_sensor) { z_sensor_ = z_sensor; }
27  void set_heading_sensor(sensor::Sensor *heading_sensor) { heading_sensor_ = heading_sensor; }
28 
29  protected:
35  enum ErrorCode {
36  NONE = 0,
39  } error_code_;
40 };
41 
42 } // namespace mmc5603
43 } // namespace esphome
sensor::Sensor * y_sensor_
Definition: mmc5603.h:32
float get_setup_priority() const override
Definition: mmc5603.cpp:94
void set_datarate(MMC5603Datarate datarate)
Definition: mmc5603.h:23
This class simplifies creating components that periodically check a state.
Definition: component.h:283
void set_heading_sensor(sensor::Sensor *heading_sensor)
Definition: mmc5603.h:27
sensor::Sensor * x_sensor_
Definition: mmc5603.h:31
void set_z_sensor(sensor::Sensor *z_sensor)
Definition: mmc5603.h:26
enum esphome::mmc5603::MMC5603Component::ErrorCode error_code_
void set_x_sensor(sensor::Sensor *x_sensor)
Definition: mmc5603.h:24
This is a workaround until we can figure out a way to get the tflite-micro idf component code availab...
Definition: a01nyub.cpp:7
sensor::Sensor * z_sensor_
Definition: mmc5603.h:33
Base-class for all sensors.
Definition: sensor.h:57
This Class provides the methods to read/write bytes from/to an i2c device.
Definition: i2c.h:133
void set_y_sensor(sensor::Sensor *y_sensor)
Definition: mmc5603.h:25
sensor::Sensor * heading_sensor_
Definition: mmc5603.h:34