This example changes the data rate from fastest (80 Hz) to slowest (0.63 Hz).
#include <iostream>
#include <iomanip>
#include <chrono>
#include <thread>
#include "mag3110.hpp"
int main(int argc, char** argv)
{
uint8_t dros;
cout << hex << setiosflags(ios::showbase);
cout << "Data rate 80.0 Hz: " << static_cast<int>(dros) << endl;
cout << "Data rate 40.0 Hz: " << static_cast<int>(dros) << endl;
cout << "Data rate 20.0 Hz: " << static_cast<int>(dros) << endl;
cout << "Data rate 10.0 Hz: " << static_cast<int>(dros) << endl;
cout << "Data rate 5.0 Hz: " << static_cast<int>(dros) << endl;
cout << "Data rate 2.5 Hz: " << static_cast<int>(dros) << endl;
cout << "Data rate 1.3 Hz: " << static_cast<int>(dros) << endl;
cout << "Data rate 0.6 Hz: " << static_cast<int>(dros) << endl;
return 0;
}