ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
mmc5603.h
Go to the documentation of this file.
1#pragma once
2
6
7namespace esphome::mmc5603 {
8
14
15class MMC5603Component final : public PollingComponent, public i2c::I2CDevice {
16 SUB_SENSOR(x)
17 SUB_SENSOR(y)
18 SUB_SENSOR(z)
19 SUB_SENSOR(heading)
20
21 public:
22 void setup() override;
23 void dump_config() override;
24 void update() override;
25
26 void set_datarate(MMC5603Datarate datarate) { datarate_ = datarate; }
27 void set_auto_set_reset(bool auto_set_reset) { auto_set_reset_ = auto_set_reset; }
28
29 protected:
31 bool auto_set_reset_{true};
32};
33
34} // namespace esphome::mmc5603
virtual void setup()
Where the component's initialization should happen.
Definition component.cpp:84
This class simplifies creating components that periodically check a state.
Definition component.h:532
This Class provides the methods to read/write bytes from/to an i2c device.
Definition i2c.h:144
bool z
Definition msa3xx.h:1
@ MMC5603_DATARATE_150_0_HZ
Definition mmc5603.h:11
@ MMC5603_DATARATE_75_0_HZ
Definition mmc5603.h:10
@ MMC5603_DATARATE_255_0_HZ
Definition mmc5603.h:12
uint16_t x
Definition tt21100.cpp:5
uint16_t y
Definition tt21100.cpp:6