35 static void read_cb(uint8_t result);
102 mag_data[0] =
data_[0];
103 mag_data[1] =
data_[1];
104 mag_data[2] =
data_[2];
108 return mag_data[0] != -4096 && mag_data[1] != -4096 && mag_data[2] != -4096;
#define HMC58X3_CRA_MEAS_MODE_NORMAL
volatile uint32_t millis(void)
static void read_cb(uint8_t result)
#define HMC58X3_MODE_CONTINUOUS
#define HMC58X3_CRA_DO_75
#define HMC58X3_CRB_GN_390
static HMC5883L * mag_ptr
#define HMC58X3_CRA_NO_AVG
int8_t write(uint8_t addr, uint8_t reg, uint8_t data, void(*callback)(uint8_t), bool blocking=false)
bool read(float mag_data[])
int8_t read(uint8_t addr, uint8_t reg, uint8_t num_bytes, uint8_t *data, void(*callback)(uint8_t)=nullptr, bool blocking=false)