Home | History | Annotate | Download | only in mllite

Lines Matching refs:compass

20  * $Id: compass.c 5641 2011-06-14 02:10:02Z mcaramello $
26 * @brief Motion Library - Compass Driver Layer.
27 * Provides the interface to setup and handle an compass
32 * @file compass.c
33 * @brief Compass setup and handling methods.
42 #include "compass.h"
56 #define MPL_LOG_TAG "MPL-compass"
213 * @brief Used to determine if a compass is
215 * @return INV_SUCCESS if the compass is present.
221 if (NULL != mldl_cfg->compass &&
222 NULL != mldl_cfg->compass->resume &&
230 * @brief Query the compass slave address.
231 * @return The 7-bit compass slave address.
238 return mldl_cfg->pdata->compass.address;
244 * @brief Get the ID of the compass in use.
245 * @return ID of the compass in use.
251 if (NULL != mldl_cfg->compass) {
252 return mldl_cfg->compass->id;
258 * @brief Get a sample of compass data from the device.
260 * the buffer to store the compass raw data for
272 if (mldl_cfg->compass->read_len > sizeof(inv_obj.compass_raw_data)) {
277 if (mldl_cfg->pdata->compass.bus == EXT_SLAVE_BUS_PRIMARY ||
279 /*--- read the compass sensor data.
280 The compass read function may return an INV_ERROR_COMPASS_* errors
284 ignore this compass data sample. ---*/
296 if (EXT_SLAVE_BIG_ENDIAN == mldl_cfg->compass->endian)
323 mldl_cfg->pdata->compass.address,
325 /*mldl_cfg->compass->trigger->reg */ 0x0A,
327 /*mldl_cfg->compass->trigger->value */ 0x01,
358 * @brief Sets the compass bias.
360 * Compass bias, length 3. Scale is micro Tesla's * 2^16.
388 signed char *orC = mldlCfg->pdata->compass.orientation;
409 * @brief Write a single register on the compass slave device, regardless
412 * the register to write to on the slave compass device.
442 * @brief Read values from the compass slave device registers, regardless
445 * the register to read from on the slave compass device.
448 * compass device.
476 * @brief Read values from the compass slave device scale registers, regardless
479 * the register to read from on the slave compass device.
482 * compass device.
525 MPL_LOGI("push compass offsets %hhd, %hhd, %hhd", data[0], data[1], data[2]);
534 MPL_LOGI("pulled compass offsets %hhd %hhd %hhd", data[0], data[1], data[2]);