Go to the source code of this file.
◆ hmc5883l_init()
Initialize an Hmc5883l device
- Parameters
-
bus | Number of the used I2C bus |
- Returns
- Device context, or NULL on error
◆ hmc5883l_close()
Close the device
- Parameters
-
◆ hmc5883l_update()
Updates the values by reading from I2C
- Parameters
-
- Returns
- UPM result
◆ hmc5883l_coordinates()
Returns a pointer to an int[3] that contains the coordinates as integers. hmc5883l_update() must have been called prior to calling this function.
- Parameters
-
- Returns
- *int to an int[3] (X, Y, Z)
◆ hmc5883l_set_declination()
Sets the magnetic declination for better accuracy. hmc5883l_update() must have been called prior to calling this function.
- Parameters
-
Device | context |
dec | The magnetic declination |
◆ hmc5883l_get_declination()
Gets the current magnetic declination value. hmc5883l_update() must have been called prior to calling this function.
- Parameters
-
- Returns
- Magnetic declination as a floating-point value
◆ hmc5883l_context