| 
    upm
    1.3.0
    
   Sensor/Actuator repository for libmraa (v1.7.0) 
   | 
 

Go to the source code of this file.
Data Structures | |
| struct | _hmc5883l_context | 
Functions | |
| hmc5883l_context | hmc5883l_init (int bus) | 
| void | hmc5883l_close (hmc5883l_context dev) | 
| upm_result_t | hmc5883l_update (const hmc5883l_context dev) | 
| float | hmc5883l_direction (const hmc5883l_context dev) | 
| float | hmc5883l_heading (const hmc5883l_context dev) | 
| const int16_t * | hmc5883l_coordinates (const hmc5883l_context dev) | 
| void | hmc5883l_set_declination (const hmc5883l_context dev, float dec) | 
| float | hmc5883l_get_declination (const hmc5883l_context dev) | 
Typedefs | |
| typedef struct _hmc5883l_context * | hmc5883l_context | 
| hmc5883l_context hmc5883l_init | ( | int | bus | ) | 
Initialize an Hmc5883l device
| bus | Number of the used I2C bus | 

| void hmc5883l_close | ( | hmc5883l_context | dev | ) | 
Close the device
| Device | context | 

| upm_result_t hmc5883l_update | ( | const hmc5883l_context | dev | ) | 
Updates the values by reading from I2C
| Device | context | 

| const int16_t* hmc5883l_coordinates | ( | const hmc5883l_context | dev | ) | 
Returns a pointer to an int[3] that contains the coordinates as integers. hmc5883l_update() must have been called prior to calling this function.
| Device | context | 

| void hmc5883l_set_declination | ( | const hmc5883l_context | dev, | 
| float | dec | ||
| ) | 
Sets the magnetic declination for better accuracy. hmc5883l_update() must have been called prior to calling this function.
| Device | context | 
| dec | The magnetic declination | 

| float hmc5883l_get_declination | ( | const hmc5883l_context | dev | ) | 
Gets the current magnetic declination value. hmc5883l_update() must have been called prior to calling this function.
| Device | context | 

| typedef struct _hmc5883l_context * hmc5883l_context | 
Device context
 1.8.6