#include <modm/driver/inertial/mmc5603.hpp>
|
enum | Register : uint8_t |
|
enum | Status1 : uint8_t |
|
enum | Control0 : uint8_t |
|
enum | Control1 : uint8_t |
|
enum | Bandwidth : uint8_t |
|
enum | Control2 : uint8_t |
|
enum | PeriodicalSet : uint8_t |
|
|
| MODM_FLAGS8 (Status1) |
|
| MODM_FLAGS8 (Control0) |
|
| MODM_FLAGS8 (Control1) |
|
| MODM_FLAGS_CONFIG (Control1, Bandwidth) |
|
| MODM_FLAGS8 (Control2) |
|
| MODM_FLAGS_CONFIG (Control2, PeriodicalSet) |
|
| Mmc5603 (Data &data, uint8_t address=addr ()) |
| Constructor, requires a mmc5603::Data object.
|
|
modm::ResumableResult< bool > | ping () |
|
modm::ResumableResult< bool > | startTemperatureMeasurement () |
|
modm::ResumableResult< bool > | configureContinuousMode (uint8_t frequency, Bandwidth bandwidth=Bandwidth::Ms2_0) |
| Continuous Mode up to 250Hz with Automatic Set/Reset, 2ms Measurement Time.
|
|
Data & | getData () |
|
Status1_t | getStatus1 () |
|
uint8_t | getOutputDataRate () |
|
Control0_t | getControl0 () |
|
Control1_t | getControl1 () |
|
Control2_t | getControl2 () |
|
modm::ResumableResult< bool > | readProductId (uint8_t &value) |
|
modm::ResumableResult< bool > | readMagneticField () |
|
modm::ResumableResult< bool > | update (Register reg, Register_t setMask, Register_t clearMask=Register_t (0)) |
|
modm::ResumableResult< bool > | write (Register reg, uint8_t value) |
|
modm::ResumableResult< bool > | read (Register reg, uint8_t &value) |
|
modm::ResumableResult< bool > | read (Register reg, uint8_t *data, uint8_t size) |
|
void | attachConfigurationHandler (I2c::ConfigurationHandler handler) |
|
void | setAddress (uint8_t address) |
|
|
static constexpr uint8_t | addr (uint8_t factory=0) |
|
|
static constexpr uint8_t | ProductID {0x10} |
|
template<class I2cMaster>
class modm::Mmc5603< I2cMaster >
- Author
- Niklas Hauser
template<class I2cMaster >
The bandwidth adjusts the length of the decimation filter. It controls the duration of each measurement.
- Note
- X/Y/Z channel measurements are taken sequentially. Delay Time among those measurements is 1/3 of the Measurement Time defined in the table.
template<class I2cMaster >
These bits determine how many measurements are done before a set is executed, when the part is in continuous mode and the automatic set/reset is enabled. From 000 to 111, the sensor will do one set for every 1, 25, 75, 100, 250, 500, 1000, and 2000 samples. In order to enable this feature, both En_prd_set and Auto_SR must be set to 1, and the part should work in continuous mode. Please note that during this operation, the sensor will not be reset.
template<class I2cMaster >
static constexpr uint8_t modm::Mmc5603< I2cMaster >::addr |
( |
uint8_t |
factory = 0 | ) |
|
|
inlinestaticconstexpr |
The MEMSIC device 7-bit device address is 0110000 where the three LSB’s are pre-programmed into the MMC5603NJ by the factory.
Attaches a configuration handler, which is called before a transaction, whenever the configuration has to be changed.
Run the resumable function.
You need to implement this method in you subclass yourself.
- Returns
- >
NestingError
if still running, <=NestingError
if it has finished.
- Returns
- the nesting depth in the current resumable function, or -1 if called outside any resumable function
- Returns
true
if a resumable function is running at the current nesting level, else false
- Returns
true
when transaction is busy.
Sets a new address of the slave device.
- Parameters
-
address | the slave address not yet shifted left (address < 128). |
- Returns
true
when transaction did not return an error.
The documentation for this class was generated from the following file: