Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: ConfigFile SDFileSystem mbed
Fork of LAURUS_program by
HMC5883L.h
00001 #pragma once 00002 00003 const static int hmc_addr = 0x3c; 00004 00005 typedef union { 00006 char reg[6]; 00007 struct { 00008 uint8_t mag_x_L; 00009 uint8_t mag_x_H; 00010 uint8_t mag_y_L; 00011 uint8_t mag_y_H; 00012 uint8_t mag_z_L; 00013 uint8_t mag_z_H; 00014 } byte; 00015 00016 int16_t value[3]; 00017 00018 } HMC_DATA; 00019 00020 class HMC5883L { 00021 public: 00022 HMC5883L(I2C* p_i2c); 00023 ~HMC5883L(); 00024 00025 int init(); 00026 int read(); 00027 00028 HMC_DATA data; 00029 00030 private: 00031 I2C* i2c; 00032 };
Generated on Thu Jul 14 2022 07:53:07 by
1.7.2
