|
void | WriteRegister (uint8_t reg, uint8_t value) |
| Write some data into a register. More...
|
|
void | WriteBuffer (uint8_t reg, uint8_t *buffer, uint8_t length) |
| Send a buffer of data to the device. More...
|
|
uint8_t | ReadRegister (uint8_t reg) |
| Read some data from a register. More...
|
|
void | ReadBuffer (uint8_t reg, uint8_t *buffer, uint8_t length) |
| Read a buffer of data from the device. More...
|
|
HMC5883L::HMC5883L |
( |
I2C_TypeDef * |
I2C_Port, |
|
|
uint8_t |
address = 0x3C , |
|
|
uint32_t |
speed = 100000 |
|
) |
| |
Initialize a HMC5883L.
- Parameters
-
I2C | Port |
Slave | address |
Bus | speed (Hz) |
- Return values
-
float HMC5883L::getHeading |
( |
| ) |
|
Get the heading of the device.
- Parameters
-
- Return values
-
string HMC5883L::getID |
( |
| ) |
|
Get the ID string of the magnetometer.
- Parameters
-
- Return values
-
Get raw data.
- Parameters
-
- Return values
-
raw | values (3xint16_t structure) |
floatx3 HMC5883L::getScaledValues |
( |
| ) |
|
Get scaled values in gauss.
- Parameters
-
- Return values
-
scaled | values (3xfloat structure) |
float HMC5883L::getTiltCompensatedHeading |
( |
rollpitch |
angles | ) |
|
Get the tilt compensated heading of the device.
- Parameters
-
roll | and pitch angles (use de ones in radians) |
- Return values
-
void HMC5883L::setMode |
( |
CompasMesMode |
m, |
|
|
CompasAverageSamples |
avg = AvgSamples_1 , |
|
|
CompasDataRate |
rate = DataRate_15 |
|
) |
| |
Set the functionning mode of the magnetometer.
- Parameters
-
Mode | (CampasMesMode) |
Averaged | samples (CompasAverageSamples) |
Output | data rate (CompasDataRate) |
- Return values
-
void HMC5883L::setScale |
( |
CompasScale |
s | ) |
|
Set the magnetometer scale.
- Parameters
-
scale | value (from CompasScale structure) |
- Return values
-
The documentation for this class was generated from the following files:
- /Users/blackswords/Public/Dropbox/Projet M1/roverSTM/Libraries/MyLib/HMC5883L.h
- /Users/blackswords/Public/Dropbox/Projet M1/roverSTM/Libraries/MyLib/HMC5883L.cpp